Version 8.1 by Caleb James DeLisle on 2010/12/08 18:58
![]() | Includes text from another document. |
Type | Doc (Velocity Macro) |
Category | |
Developed by | Unknown |
Rating | |
License | Unknown |
Table of contents
Description
This macro renders the specified XWiki page in its own context. If I create a DocumentA with content $doc.getName() then I create a document called DocumentB with content #includeTopic("DocumentA") When I view DocumentB the output will be DocumentA.
This differs from the Include In Context Macro and the Include Form Macro which render the included document in the context of the including document.
Usage
#includeTopic("<pageName>")
Where <pageName> is the name of the document to include, such as Main.WebHome
Parameters definition
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
pageName | no | a string | none | A page name using the syntax described below |
The pagename parameter may take the following form:
[wiki:][Space.]Page
where optional parts are surrounded by brackets
- If "wiki" is present, the "Space" and "Page" parts will refer to a document in the specified wiki (in the context of an XWiki farm).
- If "Space" is present, then it will be used as part of the full page name, otherwise the space of the enclosing document will be used.
Example
This macro may be used to display an XWiki page in another one. For instance, the page Community.IRC from this web site is included below.
#includeTopic("dev:Community.IRC")