Re: [xwiki-users] Modify a Skin with attached images

2008-02-29 Thread Antonio Goncalves
Makes sense. It's working now. Thanks !!!

Antonio


2008/2/29, Vincent Massol <[EMAIL PROTECTED]>:
>
>
>  On Feb 29, 2008, at 4:43 PM, Antonio Goncalves wrote:
>
>  That's weird, when I do that I get the following url :
>
> 
>
> 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 ?
>
>
>
> ah that's because the skin is called in the context of the current page.
>
>
> You need this:
>
>
> $xwiki.getDocument("skinpagename").getAttachmentURL("myfile.jpg")
>
>
> -Vincent
>
>
>
>  2008/2/27, Vincent Massol <[EMAIL PROTECTED]>:
>
> > 
> >
> > -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  tag I have an empty src attribute
> > 
> > 
> >
> > 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 ([EMAIL PROTECTED])
> 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
>
>
>
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
>


-- 
--
Antonio Goncalves ([EMAIL PROTECTED])
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


Re: [xwiki-users] Modify a Skin with attached images

2008-02-29 Thread Vincent Massol


On Feb 29, 2008, at 4:43 PM, Antonio Goncalves wrote:


That's weird, when I do that I get the following url :



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 ?


ah that's because the skin is called in the context of the current page.

You need this:

$xwiki.getDocument("skinpagename").getAttachmentURL("myfile.jpg")

-Vincent


2008/2/27, Vincent Massol <[EMAIL PROTECTED]>:



-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  tag I have an empty src attribute



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 ([EMAIL PROTECTED])
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


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Modify a Skin with attached images

2008-02-29 Thread Antonio Goncalves
That's weird, when I do that I get the following url :



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 ?

Thanks,
Antonio


2008/2/27, Vincent Massol <[EMAIL PROTECTED]>:
>
> 
>
> -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  tag I have an empty src attribute
> 
> 
>
> 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 ([EMAIL PROTECTED])
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


Re: [xwiki-users] Modify a Skin with attached images

2008-02-27 Thread Vincent Massol



-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  tag I have an empty src attribute



Do you know what I am doing wrong ?

Thanks,
Antonio

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Modify a Skin with attached images

2008-02-27 Thread Antonio Goncalves
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  tag I have an empty src attribute



Do you know what I am doing wrong ?

Thanks,
Antonio
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users