Parent-Children Livetable macro
Display a livetable containing one level of parent-children granularity |
Type | XAR |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Compatibility | Version 1.2 doesn't work with Nested Pages. Also note that this macro requires Legacy Oldcore as it uses legacy APIs. |
Table of contents
Description
Display a livetable containing one level of parent-children granularity, where parent is defined by a document in the given space that is not the space home page, has no parent or it's parent is the space home page.
Usage
Parameters
Name | Mandatory | Description |
---|---|---|
space | no | Space name to display the livetable for. The default value is the current space. |
order | no | The order to sort document titles by. The default value is asc. |
rowCount | no | Set the number of livetable rows. Default value is 10. |
Examples
Simple usage
The parent-child hierarchy is displayed only on the ordering by the document title. Otherwise, the hierarchy is dropped, i.e. a normal livetable is displayed.
The parent is any document which has either an 'empty' parent or the WebHome page of the given space as a parent.
Results in:
The rows with a background color are highlighted in regards to the fact that those are documents which have no title set.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Release Notes
v1.2
Added rowCount parameter to set the number of rows for the livetable:
{{parentschildrenlivetable space="XWiki" order="asc" rowCount="30" /}}
v1.1
This is a bug fix version. Changed the way the JSON variable is constructed for documents with no title and how the js evaluates and treats those documents.