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.
>

The {{documentTree}} is a wiki macro that uses the {{velocity}} macro
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-index/xwiki-platform-index-tree/xwiki-platform-index-tree-macro/src/main/resources/XWiki/DocumentTree.xml#L186
so if your users can use it then they can also use the
"currentDocumentTree" wiki macro I described above.


>
> 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" /}}
>

I don't see any difference.


>
> And neither of those show any children, when the expectation was to see
> "MyChild".
>

You are mixing things. You should read
http://platform.xwiki.org/xwiki/bin/view/Features/ContentOrganization/NestedPagesMigration/
. The "parentchild" hierarchy mode that you're using is not based on the
page reference ("MyRoot.MyPage.MyChild"). You shouldn't use
hierarcyMode="parentchild" unless you are migrating from an older version
of XWiki and you want to preserve your hierarchy. But since you are using
nested pages (MyRoot.MyPage.MyChild) I doubt this is the case.


>
> Thank you for your support.  Best regards.
> _______________________________________________
> 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