Display Macro

Last modified by Thomas Mortagne on 2018/07/05 10:21

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

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard

Compatibility

Introduced in XWiki 3.4M1

Description

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.

Usage

{{display page="Page1/Page2"/}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
pageno or referencea page reference since 10.6 the reference of the page to display. You should use this parameter rather than the reference one which is more complex to use.
referenceno or pagean entity reference the reference of the entity to display
typeyesdocumentdocumentthe type of the entity. This parameter is also only useful when used with the reference parameter. It's not needed when using the page parameter.
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.

Examples

Example 1:

{{display page="Page1/Page2" /}}

Example 2 (if you want to display a page from another wiki)

{{display page="somewiki:Page1/Page2" /}}

Example 3:

{{display page="Page1/Page2" section="HMySection" /}}

Example 4 (using the reference parameter):

{{display reference="Page1.Page2.WebHome" /}}

NOTE: Be sure to include the / within the "/}} at the end, otherwise any content that comes after the included section on this page will fail to appear.

Tags:
Created by Thomas Mortagne on 2012/01/12 18:50
    

Get Connected