Overview page for subpages using Documents macro (or alternatives)

Hi everyone,

I am trying to put sensible contents on a parent page that mainly exists for structuring. In one of my particular examples, this page is called “Server” and lives at the top-level of the wiki. Below it, there are several pages named after individual hosts.

Now, as the number of hosts will grow rather large, I prefer using something like a table with filter option that is provided by the Documents macro, in contrast to e.g. using a tree-like view. However, I don’t seem to be able to properly select all descendant pages of “Server”.

If my understanding is correct, location is the parameter to be used as the others are either not appropriate, or deprecated. Using location="Server." I will include matches from all kinds of pages that have some part of their location matching. Obvious solutions would be to either be able to match the beginning of the “path” like in a regular expression (e.g. ^Server.) or qualify the string as a complete page name (e.g. .Server.). Both options don’t seem to work.

Is there a way to get the desired result, or another macro that could be used to deliver what I am looking for?

Thanks in advance!

Hi,

Yes, location="Server." should work but as you noticed, it’s not perfect as it could match other paths. In other words, right now the documents macro doesn’t really have a way to list only children. It lists all page matching the passed location.

There’s Children Macro (XWiki.org) but it’s a tree, not a table.

As as a workaround FTM you could check Parentschildrenlivetable displays nothing - #21 by vmassol and below.

Related JIRA: [XWIKI-13652] Documents Macro should support restricting displayed pages based on a root page - XWiki.org JIRA

1 Like

@vmassol Thanks a lot for your help!

Yes, that is what I had been using for the time being.

This is lovely and exactly what I was looking for! Possibly, I can also fine-tune it a bit to make it even more useful for my purposes.

Thanks again!