Documents Macro

Last modified by Thomas Mortagne on 2017/03/28 15:07

cogDisplays list of documents in a Livetable
Developed by

XWiki Development Team

0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Enterprise


Since XWiki 3.5M1


Displays a list of documents in a Livetable.

This macro is part of the Index Application.


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


  • id (optional): The internal Livetable id (the HTML id). If not specified a random id is computed. This can be used for styling the Livetable 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. ","). The default value is ",,," New in 4.2M3
  • location (optional): If 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 .). New in 8.1M2


{{documents count="5" actions="false" space="Main" parent="Main.WebHome"/}}

Results in:



If you wish to list all children documents of the current document:

 {{documents parent="$doc.fullName"/}}

Example 3

If you wish to have a single column displaying the document titles, you'd write:

{{documents count="5" actions="false" space="Main" parent="Main.WebHome" columns="doc.title"/}}

Results in:


Tags: livetable
Created by Vincent Massol on 2012/02/13 11:18

Get Connected