Documents Macro

The Documents macro displays a list of documents in a livetable.

Usage

{{documents id="<id>" count="<count>" actions="<true|false>" space="<space>" parent="<parent>" columns="<columns>" location="<location>" /}}

Parameters

NameOptionalDescriptionAccepted ValuesDefault Value
idYesThe HTML identifier of the livetableA stringIf no value is specified, a random value will be used
countYesThe number of items per page displayed by defaultA number15
actionsYesA flag stating whether to display the "Actions" column or not, depending on the user access rightstrue or falsetrue
spaceYesThe name of the space to display documents forA stringIf no value is specified, the macro will display all documents
parentYesThe parent page to display documents forA stringIf no value is specified, the macro will display all documents
columnsYesThe livetable columns to displayThe name of a livetable column"doc.name,doc.space,doc.date,doc.author"
locationYesIf specified, only display documents having a part of their full reference matching the passed location. For example, a location value of pa 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 ".").

Examples

Example 1

Display the documents in the "XWiki" space, 50 documents per page. The columns should be: the document title, the creation date, the last edit date, the last author and the "Actions" column.

{{documents id="MyCustomLivetable" count="50" actions="true" space="XWiki"
columns="doc.title,doc.creationDate,doc.date,doc.author" /}}

DocumentsMacroExample1.png

Example 2

Display all children of the "Main.WebHome" page.

{{documents id="DisplayChildren" parent="Main.WebHome" /}}

 

Related Pages

Search this space