[xwiki-users] getRenderedContent issues
Hi colleagues! I testing some application with standart organization (many of XWiki applications organized in a same way): Exists TestAppCode space with all classes, templates, sheets, codes and exists TestApp space with visualization pages using {{include document="TestAppCode.SomeTemplate"/}} When I trying to use getRenderedContent for this document from TestApp (for example, when I want to send this page by email form another page with my own code) I get rendered content of TestAppCode.SomeTemplate - not the content of my data. I want to clarify - this is because of http://jira.xwiki.org/jira/browse/XWIKI-4274? Looks like my situation ... I staying in one page and trying to getRenderedContent for the another page. Maybe exists some ways to overcome this issue? Thanks beforehand Eugen Colesnicov -- View this message in context: http://xwiki.475771.n2.nabble.com/getRenderedContent-issues-tp5666553p566655... Sent from the XWiki- Users mailing list archive at Nabble.com.
On Sun, Oct 24, 2010 at 00:31, Eugen Colesnicov <[email protected]> wrote:
Hi colleagues!
I testing some application with standart organization (many of XWiki applications organized in a same way): Exists TestAppCode space with all classes, templates, sheets, codes and exists TestApp space with visualization pages using {{include document="TestAppCode.SomeTemplate"/}}
When I trying to use getRenderedContent for this document from TestApp (for example, when I want to send this page by email form another page with my own code) I get rendered content of TestAppCode.SomeTemplate - not the content of my data.
I want to clarify - this is because of http://jira.xwiki.org/jira/browse/XWIKI-4274? Looks like my situation ... I staying in one page and trying to getRenderedContent for the another page.
Maybe exists some ways to overcome this issue?
There is several ways: - use #set($document = $xwiki.getDocument("somepage")) $document.getRenderedContent($document.content, $document.syntax) which properly set the context document (yes I agree that this difference between the two API is pretty weird) - if you have programming right you can set the context document yourself before calling getRenderedContent
Thanks beforehand Eugen Colesnicov -- View this message in context: http://xwiki.475771.n2.nabble.com/getRenderedContent-issues-tp5666553p566655... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
participants (2)
-
Eugen Colesnicov -
Thomas Mortagne