Re: [xwiki-users] How to access the com.xpn.xwiki.api.Document of the page where a Rendering Macro is included

2010-08-20 Thread Thomas Mortagne
Hi, On Fri, Aug 20, 2010 at 02:24, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I want to know how to access the *com.xpn.xwiki.api.Document* of the page where a *Rendering Macro* is included. I created a macro using the documentation at

Re: [xwiki-users] How to access the com.xpn.xwiki.api.Document of the page where a Rendering Macro is included

2010-08-20 Thread Thomas Mortagne
Hmm seems to be related to groovy (and probably other non velocity languages) actually, i will look at it. On Fri, Aug 20, 2010 at 09:28, Thomas Mortagne thomas.morta...@xwiki.com wrote: Hi, On Fri, Aug 20, 2010 at 02:24, Abel Solórzano Astorga abelsolorz...@gmail.com wrote: Hi, I want to

Re: [xwiki-users] How to access the com.xpn.xwiki.api.Document of the page where a Rendering Macro is included

2010-08-20 Thread Thomas Mortagne
In the meantime you could do the following to get the current document in groovy: {{velocity}}$xcontext.put(currentdocument, $doc){{/velocity}} {{groovy}}print xcontext.currentdocument.toString();{{/groovy}} On Fri, Aug 20, 2010 at 09:32, Thomas Mortagne thomas.morta...@xwiki.com wrote: Hmm

Re: [xwiki-users] How to access the com.xpn.xwiki.api.Document of the page where a Rendering Macro is included

2010-08-20 Thread Abel Solórzano Astorga
Thanks a lot Thomas, it works perfect. On Fri, Aug 20, 2010 at 1:37 AM, Thomas Mortagne thomas.morta...@xwiki.comwrote: In the meantime you could do the following to get the current document in groovy: {{velocity}}$xcontext.put(currentdocument, $doc){{/velocity}} {{groovy}}print

[xwiki-users] How to access the com.xpn.xwiki.api.Document of the page where a Rendering Macro is included

2010-08-19 Thread Abel Solórzano Astorga
Hi, I want to know how to access the *com.xpn.xwiki.api.Document* of the page where a *Rendering Macro* is included. I created a macro using the documentation at http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial. The problem is that when I try to access the *doc* object inside