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

XWiki Development Team

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

XWiki Enterprise, XWiki Enterprise Manager

Installable with the Extension Manager

Description

Include other pages into the current page.

Usage

{{include reference="page1.page2.WebHome"/}}

With the Nested Pages feature introduction, the reference to pages now ends with WebHome by default (except for Terminal Pages, but this concept is for advanced users). Thus don't forget to include WebHome at the end of the reference. 

In order to improve this, there are several actions that will be brought in the future:

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
referencenoan entity reference the name of the entity to include. See the Model module to understand the concept of references. Available since XWiki 3.4M1
typeyesdocumentdocumentthe type of the entity, for now only document is supported Available since XWiki 3.4M1
sectionyesstringthe 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). Available since XWiki 3.0M3
documentnoa wiki document the name of the document to include. Deprecated since 3.4M1. Use reference instead.
contextyesnew/currentcurrentdefines whether the included page is executed in its separated execution context or whether it's executed in the context of the current page. Deprecated since 3.4M1. Use display macro for context=new.

Example

Example 1:

{{include reference="DocumentToInclude"/}}

Example 2:

{{include reference="DocumentToInclude" section="HMySection"/}}

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.

Tested on

This extension has been tested with the following configurations.

Extension VersionXWiki FlavorNotes
6.1XWiki Enterprise 6.1

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 into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Tags: include
Created by Thomas Mortagne on 2008/09/30 12:57
    

Get Connected