Document Tree set Root to Current page

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Document Tree set Root to Current page

britincanada
Hey,

A very new user to xWiki, I would like to add navigation of child sub-pages to the currently viewed page. It appears that the Document Tree macro is what I need, though I don't know what I should be putting in the root property to use the current page.

I was going to add this to a template, so the page is going to be different every time.

any help would be great.

thanks
Reply | Threaded
Open this post in threaded view
|

Re: Document Tree set Root to Current page

Guillaume Lerouge
Hi Darren,

I think you're looking for $doc.fullName ;-)

Don't forget to put it inside a {{velocity}} macro (I didn't check whether
this was the right parameter name):

{{velocity}}
    {{documentTree root="$doc.fullName" /}}
{{/velocity}}

Thanks,

Guillaume

On Thu, Dec 3, 2015 at 7:44 PM, britincanada <[hidden email]>
wrote:

> Hey,
>
> A very new user to xWiki, I would like to add navigation of child sub-pages
> to the currently viewed page. It appears that the Document Tree macro is
> what I need, though I don't know what I should be putting in the root
> property to use the current page.
>
> I was going to add this to a template, so the page is going to be different
> every time.
>
> any help would be great.
>
> thanks
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Document-Tree-set-Root-to-Current-page-tp7597083.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Document Tree set Root to Current page

vmassol
Administrator
 
On 4 Dec 2015 at 15:16:29, Guillaume Lerouge ([hidden email](mailto:[hidden email])) wrote:

> Hi Darren,
>  
> I think you're looking for $doc.fullName ;-)

Actually a better reference is (fullName is only a partial reference without the wiki part):

$doc.documentReference

Thanks
-Vincent

> Don't forget to put it inside a {{velocity}} macro (I didn't check whether
> this was the right parameter name):
>  
> {{velocity}}
> {{documentTree root="$doc.fullName" /}}
> {{/velocity}}
>  
> Thanks,
>  
> Guillaume
>  
> On Thu, Dec 3, 2015 at 7:44 PM, britincanada  
> wrote:
>  
> > Hey,
> >
> > A very new user to xWiki, I would like to add navigation of child sub-pages
> > to the currently viewed page. It appears that the Document Tree macro is
> > what I need, though I don't know what I should be putting in the root
> > property to use the current page.
> >
> > I was going to add this to a template, so the page is going to be different
> > every time.
> >
> > any help would be great.
> >
> > thanks
> >
> >
> >
> > --
> > View this message in context:
> > http://xwiki.475771.n2.nabble.com/Document-Tree-set-Root-to-Current-page-tp7597083.html
> > Sent from the XWiki- Users mailing list archive at Nabble.com.
> > _______________________________________________
> > users mailing list
> > [hidden email]
> > http://lists.xwiki.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users