On Mon, Nov 10, 2014 at 5:02 PM, Adrien Moi <[email protected]> wrote:
> Hello
>
> I have a little question and I couldn't find an answer on the internet...
>
> In a groovy part, I can create list the attachments of the current document 
> with this :
> {{groovy}}
> list = doc.getAttachmentList();
> print(list);
> {{/groovy}}
>
> how can I access the documents of another page in the same way?
> On a different page of the wiki I tried
> {{groovy}}
> list = XWiki.WebHome.getAttachmentList();
> print(list);
> {{/groovy}}
> to get a list of the attachments on XWiki.WebHome, but it didn't work...
>
> Do you have any clue?

See http://platform.xwiki.org/xwiki/bin/view/SRD/xwiki

xwiki.getDocument('XWiki.WebHome').getAttachmentList()

Hope this helps,
Marius

>
> Thank you very much !
>
> Adrien
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to