Display Macro
Display an entity (document, property, etc.) |
Type | JAR |
Category | Macro |
Developed by | |
Active Installs | 0 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Compatibility | Introduced in XWiki 3.4M1 |
Table of contents
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.
It for examples allows to include a content page in the current page. To include an entity in the current context see include macro.
Usage
From WYSIWYG Editor
From Wiki Syntax
Parameters definition
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
page | no or reference | A page reference | reference one which is more complex to use. | The reference of the page to display. You should use this parameter rather than the|
reference | no or page | An entity reference | The reference of the entity to display | |
type | yes | document | document | The 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. |
section | yes | string | The 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. | |
excludeFirstHeading | yes | true or false | false | If true, exclude the heading from the displayed page if the first element of that page is a heading. |
Examples
Example 1:
Example 2 (if you want to display a page from another wiki)
Example 3:
Example 4 (using the reference parameter):
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.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Dependencies
Dependencies for this extension (org.xwiki.platform:xwiki-platform-display-macro 16.9.0):
- org.xwiki.rendering:xwiki-rendering-api 16.9.0
- org.xwiki.rendering:xwiki-rendering-transformation-macro 16.9.0
- org.xwiki.commons:xwiki-commons-context 16.9.0
- org.xwiki.platform:xwiki-platform-bridge 16.9.0
- org.xwiki.platform:xwiki-platform-model-api 16.9.0
- org.xwiki.platform:xwiki-platform-display-api 16.9.0
- org.xwiki.platform:xwiki-platform-rendering-macro-context 16.9.0
- org.xwiki.platform:xwiki-platform-rendering-macro-include 16.9.0