Display Macro

Last modified by Thomas Mortagne on 2017/09/08 09:05

cogDisplay an entity (document, property, etc.)
Developed by

XWiki Development Team

0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Enterprise, XWiki Standard


Introduced in XWiki 3.4M1


Display an entity in its own context. This mean that the entity content will be parsed and transformation executed on it as if it was rendered alone. For example a document will produce the exact same result as if you were displaying it directly.

To include an entity in the current context see include macro.


{{display reference="SpaceOf.DocumentToDisplay" type="document"/}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
referencenoan entity reference the name of the entity to display
typeyesdocumentdocumentthe type of the entity, for now only document is supported
sectionyesstringthe anchor to the section to display in the target document (note that headings generate anchors automatically in the form: "H" + heading title stripped of all non alpha characters). Only taken into account when the type is document.


Example 1:

{{display reference="DocumentToDisplay"/}}

Example 2:

{{display reference="DocumentToDisplay" section="HMySection"/}}

Example 3 (if you want to include a document from another wiki)

{{display reference="wiki:Space.PageName"/}}
Created by Thomas Mortagne on 2012/01/12 18:50

Get Connected