Hi, On Tue, Jun 14, 2016 at 1:14 PM, Isaac Jurado <[email protected]> wrote:
On Tue, Jun 14, 2016 at 11:42 AM, Marius Dumitru Florea < [email protected]> wrote:
On Tue, Jun 14, 2016 at 12:31 PM, Isaac Jurado <[email protected]> wrote:
Hello,
Searching through the web I found the following mailing list thread:
http://comments.gmane.org/gmane.comp.web.wiki.xwiki.user/28977
Which solves my problem exactly, with one minor caveat: the enterprise XWiki installation I'm using has Velocity macros disabled for average users.
Therefore, what is the equivalent of Velocity's $doc.documentReference in XWiki syntax (i.e. node id reference).
You can either hard-code the full reference of the current document (wiki:Path.To.Page) if it's not dynamic, otherwise, you can create a wiki macro http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial that uses Velocity. Your average users will have to use this "currentDocumentTree" macro.
As I mentioned, our users don't have permission to use the {{velocity}} macro so anything related to Velocity is out of the equation.
It is not clear what you want to achieve. If you are a wiki admin and have received complains that your users can not use the {{documentTree}} in order to create some content that displays the document tree for the current document, then your solution, again, as a wiki admin, is to create a very small "currentDocumentTree" macro which is tailor-made for this particular usecase and which you can recommend to your users to use in their plain-wiki content instead of the default "documentTree" macro. A user without "script" rights is able to successfully use macros (even if the macros contain scripts), as long as the macros are created and saved by a user with script rights (e.g. an admin) and that has set the macro to be visible to the entire wiki (i.e. other users). However, if your situations if that of being a regular user in a wiki where the admin did you give you "script" rights, then unfortunately the wiki syntax [1] does not have such a construct, since it is something that is achievable either through scripting or through (installed/pre-built/available) wiki macros (as detailed above and in the reply from Marius). Hope this makes it clearer. Thanks, Eduard ---------- [1] http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax
On the other hand I think I'm failing to understand the "root" parameter of the {{documentTree}} macro:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Document+Tree+Macro
Given that I have the following path:
MyRoot.MyPage.MyChild
If I want to show the Document Tree rooted at MyPage, I'm trying something like:
{{documentTree root="document:xwiki:MyRoot.MyPage" hierarcyMode="parentchild" /}}
And also:
{{documentTree root="document:xwiki:MyRoot.MyPage" hierarcyMode="parentchild" /}}
And neither of those show any children, when the expectation was to see "MyChild".
Thank you for your support. Best regards. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users