How can I include an image coming from an other page ?
Hello I'd like to include in a page an image coming from an other page. Actually I've using the HTML tag img but the problem is that I need to write absolute link. Is it possible to use XWiki syntaxe {image} ? Regards -- Xavier MOGHRABI - Consortium ObjectWeb Email: xavier.moghrabi at objectweb.org Phone: +33 4 76 61 52 35 - Skype ID: xavier.moghrabi.bureau
You need some scripting for this. Something like. #(set $imagedoc = $xwiki.getDocument("Toto.MyPage")) <img url="$imagedoc.getAttachmentURL("file.jpg","download")" /> Ludovic Xavier MOGHRABI a écrit :
Hello
I'd like to include in a page an image coming from an other page.
Actually I've using the HTML tag img but the problem is that I need to write absolute link.
Is it possible to use XWiki syntaxe {image} ?
Regards
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
I have a strange behaviour: Here is my code in the page: #(set $imagedoc = $xwiki.getDocument("Main.CarreSciences")) <img src="$imagedoc.getAttachmentURL("small10.jpg","download")" /> Here what I can read once the page saved: #(set $imagedoc=com.xpn.xwiki.api.Document@e4d64b) But if I use the following code, it works: <img src="$xwiki.getDocument("Main.CarreSciences").getAttachmentURL("small10.jpg","download")" /> Le vendredi 13 Mai 2005 15:55, Ludovic Dubost a écrit :
#(set $imagedoc = $xwiki.getDocument("Toto.MyPage")) <img url="$imagedoc.getAttachmentURL("file.jpg","download")" />
-- Xavier MOGHRABI - Consortium ObjectWeb Email: xavier.moghrabi at objectweb.org Phone: +33 4 76 61 52 35 - Skype ID: xavier.moghrabi.bureau
On 5/13/05, Xavier MOGHRABI <xavier.moghrabi@objectweb.org> wrote:
I have a strange behaviour:
Here is my code in the page: #(set $imagedoc = $xwiki.getDocument("Main.CarreSciences")) <img src="$imagedoc.getAttachmentURL("small10.jpg","download")" />
Here what I can read once the page saved: #(set $imagedoc=com.xpn.xwiki.api.Document@e4d64b)
But if I use the following code, it works: <img src="$xwiki.getDocument("Main.CarreSciences").getAttachmentURL(" small10.jpg","download")" />
Le vendredi 13 Mai 2005 15:55, Ludovic Dubost a écrit:
#(set $imagedoc = $xwiki.getDocument("Toto.MyPage")) <img url="$imagedoc.getAttachmentURL("file.jpg","download")" />
I think the parenthesis is not at the right place.
try this : #set ($imagedoc = $xwiki.getDocument("Main.CarreSciences")) <img src="$imagedoc.getAttachmentURL("small10.jpg","download")" /> -Jérémi -- http://www.sport42.net - http://fr.runnerslifestyle.com Développeur http://www.xwiki.org Tel : 06.84.50.33.49 skype: jeremi23
This works fine. Thanks Le vendredi 13 Mai 2005 18:28, jeremi joslin a écrit :
try this : #set ($imagedoc = $xwiki.getDocument("Main.CarreSciences")) <img src="$imagedoc.getAttachmentURL("small10.jpg","download")" />
-Jérémi
-- Xavier MOGHRABI - Consortium ObjectWeb Email: xavier.moghrabi at objectweb.org Phone: +33 4 76 61 52 35 - Skype ID: xavier.moghrabi.bureau
participants (3)
-
jeremi joslin -
Ludovic Dubost -
Xavier MOGHRABI