IncludeForm Macro

This is a Velocity macro, bundled with all the XWiki products by default.
Macro developed by the XWiki Development Team.
This macro cannot currently be downloaded separately.

IncludeForm Macro

Renders the specified XWiki page in the context of the top level including document and surrounded by {pre}{/pre} tags to avoid further rendering of XWiki syntax by the including document. This macro is meant to include class sheets pages, i.e. pages displaying content of a Form in view mode and displaying the Form in edit mode.

Warning: When this macro is used on a page, clicking on the Edit button for the page automatically edits the page in Form mode, a.k.a inline mode. If you simply want to include content from another page you should use the IncludeInContext macro

You can also use Include Topic Macro to include a page that is rendered within its own context

Usage

#includeForm($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 within another one. It is needed, for example, when the current page has associated object instances and the page to be included does something generic with object data of that kind.

For instance, this page itself contains an instance of the Macro Class XWiki Class which contains the content for the different parts of a macro description (Macro Type, Created By, Download page, etc. The wiki content of this page is simply:

#includeForm("XWiki.MacroClassSheet")

which renders the Macro Class Sheet page in the context of this page and allows references to an Macro Class object instance to refer to the instance associated with this page.

Result

The rendering of the current page is the result of the example above.

Tags:
Created by LuisArias on 2007/04/08 12:54
Last modified by Vincent Massol on 2009/08/19 12:49

This wiki is licensed under a Creative Commons license
2.2.1.27354