Hi xwiki-users,
In XWiki Syntax 1.0, I was able to do something like this:
<a href="${documentURLRoot}"><img
src="$xwiki.getSkinFile('icons/black-file.png')" alt="Root
URL" title="Root
URL" /></a>
This would render an icon from the current skin as a link. I understand
that in XWiki Syntax 2.0, there's a new form of this available:
[[image:Space.Wiki@picture.png>>${documentURLRoot}]]
This works if the image exists in your document as an attachment, but
doesn't work when the image link is relative to your web context:
[[image:$xwiki.getSkinFile('icons/black-file.png')>>${documentURLRoot}]]
This renders as the following:
<a
href="http://www.google.com/">
<img alt="/xwiki/skins/albatross/icons/black%2Dfile.png"
class="wikimodel-freestanding"
src="/xwiki/bin/download/XWiki/WebHome/%2Fxwiki%2Fskins%2Falbatross%2Ficons%2Fblack%252Dfile.png"/>
</a>
which is not what I expected... One workaround is to put an explicit
"http://server-name:port/" before the $xwiki.getSkin() call, but that ties
the wiki to the server's address/port.
One other interesting thing I found out was that:
{{velocity}}
{{html wiki=true}}
* this works - [[image:
http://localhost:8080/$xwiki.getSkinFile('icons/black-file.png')]]
* this doesn't work - <img
src=$xwiki.getSkinFile('icons/black-file.png')>
{{/html}}
{{/velocity}}
It seems that the HTML Macro's final filter parses this last test case as 1
BulletedListBlock and 1 XMLBlock, but I'm not sure if this the expected
behavior. If this is the expected behavior, the more need to get the
[[image:]] tag working...
Thanks again for the great job!