Is it possible to "children" macro give a parameter with page name?

Hi!
I want to include in one page list of another page children. I try to use “children” macro, but it returns only children of current page. Is it possible to modify “children” macro to give it a pagename as a parameter? By default pagename parameter may be a current page, so by default “children” macro action will be the same, but if it find a parameter - it will returns children of other page…

Regards, Vadim

Hi @amadis,

not sure if this solves your problem.

I used the “Page tree” macro directly to display the page children of another page.

Here is an example source code:

{{documentTree root="document:xwiki:Help.WebHome"/}}

For your specific page use:
{{documentTree root="document:xwiki:[Your Parent Page].WebHome"/}}

So for “Root” field of the “Page Tree” macro use document:xwiki:[Your Parent Page].WebHome and for “Page Hierarchy Mode” keep the default value reference.

Hope this helps.

Best,
Dolo

1 Like

Hi Dolo!
Many thanks for your tip, it really works great!

Regards, Vadim

Hi,

glad to hear that this could solve your problem :slight_smile:

Have a nice day!

Best regards,
Dolo