Include Topic Macro

Last modified by Vincent Massol on 2013/03/11 09:39

cogIncludes text from another document.
TypeDoc (Velocity Macro)
Developed by

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

This macro is obsolete and is only supported for use with syntax/1.0. It may work with the new rendering engine but you should use the new Include Macro instead.

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("SpaceName.PageName")

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
pageNamenoa stringnoneA 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 name 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")

Equivalent Example Using Modern Include Macro

{{include document="dev:Community.IRC" context="new" /}}
Created by LuisArias on 2007/04/08 11:39
    

Get Connected