What is a Template Path?

A template path is an element that returns a typed value. Types can be one of the following:
Table 1. Template path element types
Type Description
Object An object is an element that will handle some fields. Fields are sub-paths handling typed values as described here. Fields can be accessed using a relative path fieldName, or using the object relative or absolute path with the / operator: objectPath/fieldName.
Selectable Object Some objects are selectable; an identifier is added to the path, making it possible to select one of the object instances according to a selector. The path will then look like :objectPath[expression];expression is a selector identifying an object instance. The selector meaning will be unique for each Selectable Object.When the object is referenced without using the selector, the default object instance is used. The default object instance's meaning will be unique for each Selectable Object.
Component

A component is an object that will be also associated with a snippet. This type of value could be used in an instruction asking for rendering (gwc:replace or gwc:content) as a call to the snippet corresponding to this component. This type of value could also be used in gwc:condition to test the existence or non-existence for this component.

A component is an object and will have some sub paths.

The snippet identifier used to render the component will be unique for each Component.

Collection

A collection is a list of items. The type of the items will be unique, and will be one of the types listed.

A collection will be scanned using the gwc:repeatinstruction.

Each collection also has an additional field length, to retrieve the number of items in the collection: collectionPath/length.

Attribute An attribute is a literal value typed as a STRING, BOOLEAN, or NUMBER.