Start page / Template development / Template syntax / System objects / #docGroup

#docGroupAvailable from FirstSpirit Version 4.0

The system object #docGroup is used within the context of document groups and controls the generation of documents. It refers to the ("virtual") root node of the current document group. Via dot notation it provides various methods with which, for example, a table of contents can be generated.

Important In general system objects can be read-accessed only. However, there are several methods which can also modify system objects or can affect the system performance. These include, e.g. the output of a document group's elements during generation (cf. #docGroup.pageFirst).

In the following the useable method invocations are listed:

Variable

Functions

#docGroup.childs

Returns a list of the document group's child nodes. Each child is in turn of the same type as #docGroup. The list of children contains nodes of the type "page reference" first, followed by nodes of the type "menu level".

#docGroup.depth

Returns the depth of the node in the document group (e.g. "0" for the highest level). By way of comparison: Nodes of the #docGroup.childs list have depth "1".

#docGroup.isFolder

Indicates whether the node is of the type "menu level" (value true) or not (value false).

#docGroup.isPageRef

Indicates whether the node is of the type "page reference" (value true) or not (value false).

#docGroup.index

Returns the node's index in the "childs" list of the parent node.

#docGroup.parent

Returns the parent node of the element. If the docGroup is already the root node null is returned.

#docGroup.selected

Returns the value true, if the node itself or a child node is currently being written in the output.

#docGroup.label

Returns the heading of the node; for the root this equals the name of the document group, for menu levels the menu name and for page references the sitemap name.

#docGroup.chapter

Returns the chapter number, e.g. a text in the form "2.3.1".

#docGroup.section

Returns the chapter number; however, unlike #docGroup.chapter, with #docGroup.section section only folders are included in the chapter numbering.

#docGroup.root

Returns the virtual root element (equals the value of #docGroup).

#docGroup.pageFirst

The value should be set to true in the start template (using the expression $CMS_SET(...)$), if pages are to be output before folders. Output within the template can be achieved with the expression $CMS_VALUE(...)$.

  
Important Further information about working with document groups and examples can be found in the Document groups area.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.12 | Data privacy