Include Macro

The Include macro allows you to include other pages in the current page.


{{include reference="<reference>" type="<document>" section="H<section>" context="<new|current>"/}}
{{include document="<document>" type="<document>" section="H<section>" context="<new|current>"/}}


NameOptionalAllowed ValuesDefault ValueDescription
referenceNoan entity referencenone Indicates the name of the entity to include.
typeYesdocumentdocument Indicates the type of the entity but for now only document is supported.
sectionYesstringnone Indicates the anchor to the section to include in the target document (E.g.{{include reference="SpaceName.DocumentToInclude" section="HSectionName"/}}).
documentNoa wiki document none Represents the name of the document to include. Note that this parameter is deprecated and that you should use the reference parameter instead.
contextYesnew/currentcurrent Defines whether the included page is executed in its separated execution context or in the context of the current page. If "context=new" you should use the Display macro instead.


{{include reference="xwiki:Sandbox.WebHome" type="document" context="new" /}}
{{include reference="xwiki:Sandbox.WebHome" type="document" section="HStyles" context="new" /}}

Related Pages

Trying to decide between Cloud and On Premise? See the comparison on the XWiki Help Center.

Search this space