Include Macro
Include an entity (document, property, etc.) |
Type | JAR |
Category | |
Developed by | |
Active Installs | 0 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Enterprise, XWiki Enterprise Manager |
Table of contents
Description
Include other pages into the current page. By default this macro includes the content in the context of the current page. For an include of content use display 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 include. You should use this parameter rather than the|
reference | no or page | an entity reference | the reference of the entity to include. See the Model module to understand the concept of references. | |
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 Heading section to include in the target document (note that headings generate anchors automatically in the form: "H" + heading title stripped of all non alpha characters). | |
document | no | a wiki document | the name of the document to include. | |
context | yes | new/current | current | defines whether the included page is executed in its separated execution context or whether it's executed in the context of the current page. |
Example
Example 1:
Example 2 (if you want to include 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-rendering-macro-include 11.7):
- org.xwiki.commons:xwiki-commons-context 11.7
- org.xwiki.platform:xwiki-platform-bridge 11.7
- org.xwiki.platform:xwiki-platform-model 11.7
- org.xwiki.platform:xwiki-platform-display-api 11.7
- org.xwiki.platform:xwiki-platform-rendering-macro-context 11.7
- org.xwiki.platform:xwiki-platform-rendering-transformation-macro 11.7
- org.xwiki.rendering:xwiki-rendering-api 11.7
- org.xwiki.rendering:xwiki-rendering-transformation-macro 11.7