Documents Macro
Last modified by Vincent Massol on 2025/06/23 10:35
![]() | Displays list of documents in a Livetable |
Type | XAR |
Category | Macro |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Compatibility | Since XWiki 3.5M1 |
Table of contents
Description
Displays a list of documents in a Live Data.
Usage
{{documents id="<id>" count="<count>" actions="<true|false>" space="<space>" parent="<parent>" columns="<columns>" location="<location>"/}}
Parameter definitions
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
id | yes | Random id | The internal Live Data id (the HTML id). This can be used for styling the table for example. | |
count | yes | 15 | The number of items to display by default. | |
actions | yes | true/false | true | Whether to show the actions columns or not if the user has the permissions |
columns | yes | doc.title,doc.location,doc.date,doc.author | If specified, only display specified columns (e.g. doc.name,doc.author). See the Livetable documentation for the list of available columns. | |
location | yes | N/A | If specified, only display documents having a part of their full reference matching the passed location. For example a location value of par would match a document with a reference of France.Paris.SomePage. Also note that the / character is accepted as a reference separator (in addition to .). | |
filters | yes | N/A | XWiki 17.4.0+, 16.10.9+ If specified, the provided filters is used as the default filter for the Live Data. Those filters are directly passed to the Live Data macro filters parameter. Note that the viewer of the Live Data see the filters and can change them. | |
space | yes | N/A | If specified, only lists documents found in the passed space (by default all documents are listed). The full space reference must be passed. For example to list a document located in the Space1.Space2 space you'd need to use space="Space1.Space2 (simply using Space2 wouldn't work). Doesn't work with Nested Pages, use the location parameter instead. | |
parent | yes | N/A | If specified, only list pages having the specified parent (by default all documents are listed). Doesn't work with Nested Pages, use the location parameter instead. |
Example 1
Display all pages having Drafts. as part of their references.
{{documents location="Drafts."/}}
Results in:
Example 2
Display all pages having Drafts. as part of their references, and filtered by
{{documents location="Drafts." filters="doc.author=Admin"/}}
Notice how the "Last Author" column is pre-filled with a filter on the Administrator, but can still be changed.