That's weird, when I do that I get the following url :<img src="/xwiki/bin/download/Main/WebHome/myfile.jpg"/>And of course there's no image at such address. I was expecting the URL of my skin page like /xwiki/bin/view/Main/MySkin. Do you know why I get this URL ?
2008/2/27, Vincent Massol <vincent@massol.net>:<img src="$doc.getAttachmentURL("myfile.jpg")"/>
-Vincent
On Feb 27, 2008, at 6:12 PM, Antonio Goncalves wrote:
Hi,I'm following the "Modifying a skin" chapter from the Admin Guide to create a new skin (http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Skins). I've created a new page, attached an image to it ("myfile.jpg"), added the XWiki.XWikiSkins class to it and overrode some .vm files. I just don't know how to refer to the attached image ? I've tried several things :#set($logo = $!attachmentpage.getAttachment("myfile.jpg"))
#set($logo = $!doc.getAttachment("myfile.jpg"))
#set($logo = $!prefdoc.getAttachment("myfile.jpg"))Even some
#set($logourl = $prefdoc.getAttachmentURL($logo.filename,"download"))
But when I use the <img> tag I have an empty src attribute<img src="$!logourl" alt="XWiki"/><img src="$!logo" alt="XWiki"/>Do you know what I am doing wrong ?Thanks,Antonio
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
--
Antonio Goncalves (antonio.goncalves@gmail.com)
Software architect
Paris JUG leader : www.parisjug.org
Web site : www.antoniogoncalves.org
Blog: jroller.com/agoncal
LinkedIn: www.linkedin.com/in/agoncal _______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users