Version 15.1 by Caleb James DeLisle on 2010/12/08 20:24

cogInclude a document which will be rendered in the context of the current document even when editing.
TypeDoc (Velocity Macro)
Category
Developed byUnknown
Rating
0 Votes
LicenseUnknown

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 the context of the top level including document. If I create a DocumentA with content $doc.getName() then I create a document called DocumentB with content #includeInContext("DocumentA") When I view DocumentB the output will be DocumentB. To render a document in it's own context, use Include Topic Macro instead.

This macro will include the content of another page for viewing. If the user is editing the page in "inline mode", the included page will still be included but it too will be in "inline" edit mode. This differs from the Include In Context Macro which only includes the document when in view mode.

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 Include In Context Macro.

Usage

#includeForm("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

#includeForm("ExtensionCode.ExtensionSheet")

Equivalent Example Using Modern Include Macro

NOTE: This will not make the default edit mode become inline edit.

{{include document="ExtensionCode.ExtensionSheet" /}}

Get Connected