Documents Macro
Last modified by Manuel Leduc on 2024/07/05 17:40
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 XWiki 16.1.0+ Live Data (XWiki <16.2.0 Livetable).
Usage
{{documents id="<id>" count="<count>" actions="<true|false>" space="<space>" parent="<parent>" columns="<columns>" location="<location>"/}}
where:
- id (optional): The internal XWiki 16.1.0+ Live Data (XWiki <16.2.0 Livetable) id (the HTML id). If not specified a random id is computed. This can be used for styling the table for example.
- count (optional): The number of items to display by default (defaults to 15)
- actions (optional): Whether to show the actions columns or not if the user has the permissions (defaults to true)
- space (optional, deprecated): 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 (optional and deprecated): 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.
- columns (optional): If specified, only display specified columns (e.g. doc.name,doc.author). The default value is doc.title,doc.location,doc.date,doc.author.
- location (optional): 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 .).
Example 1
Display all pages having Drafts. as part of their references.
{{documents location="Drafts."/}}
Results in: