Wiki source code of Display a List of Data in a Page
Last modified by Eleni Cojocariu on 2026/09/11 22:21
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | Display a list of entries in a page with the ##liveData## Macro, described in [[Live Data>>doc:documentation.xs.user.livedata.WebHome]]. | ||
| 2 | |||
| 3 | 1. Edit the page in "Source" mode or with the [[Wiki editor>>doc:documentation.xs.user.base.page.edit-page.edit-wiki-editor.WebHome]] and write a ##liveData## Macro where the list should appear.((( | ||
| 4 | {{code}} | ||
| 5 | {{liveData | ||
| 6 | id="reports" | ||
| 7 | properties="doc.title,tags,doc.date" | ||
| 8 | source="liveTable" | ||
| 9 | sourceParameters="className=XWiki.TagClass&translationPrefix=platform.index." | ||
| 10 | /}} | ||
| 11 | {{/code}} | ||
| 12 | ))) | ||
| 13 | 1. Set ##source## to the id of the [[Live Data source>>doc:documentation.xs.user.livedata.display-data.sources.WebHome]] providing the entries, and ##sourceParameters## to the query string that source expects. | ||
| 14 | 1. Set ##properties## to the comma-separated ids of the properties to display, in the order they should appear. Leave it out to display every property the source declares. | ||
| 15 | 1. Set the optional ##id##, ##sort##, ##filters##, ##limit## and ##layouts## parameters, listed in [["liveData" Macro>>doc:documentation.xs.user.livedata.display-data.macro.WebHome]]. | ||
| 16 | 1. Save the page. The entries are displayed in the first layout of the list, as follows:((( | ||
| 17 | {{image reference="live-data-page.png" size="extra" alt="A saved wiki page displaying its entries as a Live Data table with a filter row and a pagination bar"/}} | ||
| 18 | ))) |