Start page / Template development / Variables / Definition and output / in metadata

Variables in metadata (metadata variables)

Contents

Metadata (singular: meta information) is additional information, which is available for a FirstSpirit object. It can be meta data assigned by the system (e.g. “last change date”, “last editing editor”, “released by”), but it is also possible to define further project-specific metadata.

Definition of metadata

image_select_metadataTemplate

Meta data template: Selection via ServerManager

A metadata template is required to define metadata.

The following steps are required to do this:

  1. A page template is first created in the project's Template Store (SiteArchitect, see Chapter Page templates).
  2. The new template must then be selected as a metadata template in ServerManager in the project properties (“Options” menu, “metadata template” field, see figure, see also Options (→Documentation for Administrators)).
  3. After having defined the metadata template for a project the “Metadata” tab is displayed in all stores in SiteArchitect. Within the tab the editors can enter content with the help of the input components defined in the metadata template (see Metadata (→Documentation FirstSpirit SiteArchitect)).

Analogous to a page template, the metadata template can use all FirstSpirit input components (forms). However, the following points must be noted for the creation of the metadata template:

  • Metadata is not language-dependent, for the labeling of the input components (LANGINFOS / LANGINFO) only the fallback definition (lang="*") is taken into account.
  • In general, it is advisable not to use fall-back values (see Default values page).
  • Several input components cannot be empty, regardless of whether the editor has made an input or not (for example CMS_INPUT_DOMTABLE) or cannot be emptied any more as soon as the editor has made their first input (for example, CMS_INPUT_DOM, CMS_INPUT_RADIOBUTTON) (see Using metadata section).

Using metadata

Each input component is assigned a unique identifier (variable name) within the metadata template. The variable content (of the metadata variables) can be output within the template sets via the system object #global in conjunction with the .meta() method.

Important Metadata contents are denoted in FirstSpirit SiteArchitect by the icon in the project tree. To show the symbols, the menu item “Show symbols” must be activated in the “View” menu.

Meta information is deemed to be set on a node as soon as an input is made in an input component and saved, the is displayed as soon as meta information is set. Several input components cannot be “emptied”, e.g. in the case of CMS_INPUT_DOM, in which the entire content is removed from the component. A node can be set to an actual “empty” status using the “Delete metadata” function in the context menu under “Extras”. The Restore function in the version history of a node (see Version history functions (→Documentation FirstSpirit SiteArchitect)) can also be used to reset metadata to a previous status (“Reset metadata” option). However, these two functions (“Delete metadata” and “Reset metadata”) always relate to the whole node and not to individual input components of the metadata templates.

Inheritance of metadata

Metadata can be inherited (passed on) on lower level nodes, so that they ideally only have to be entered and maintained in a few places in the project and can be transferred for hierarchically dependent nodes or sub-trees.

The following attributes can be used in the output to define which metadata is to be taken into account in the inheritance:

  • none: no inheritance – No metadata of higher level nodes is taken into account in the output.
  • inherit: Retrieve parent node – If no metadata is stored on the current node, the next highest node of the store is taken into account in the output of the metadata.
  • add: additive inheritance – All higher level nodes, starting from the root node of the store, are taken into account in the output of the metadata.

If no output type is given, the data is directly read out of the given node (corresponds to none). For further information on these output types, see #global and metainformation.

Notes on using add
When outputting or evaluating metadata, the inheritance of metadata on lower hierarchy levels can be taken into account. In the input components concerned, however, the editor is always only displayed the metadata defined on the current node, not the inherited metadata. This can result in wrong operation (user errors).

Note on using metadata in section references
In section references, for output via the parameters none and inherit the respective source section (section from which the section reference was created) is used to determine the meta information or rather the object chain of the source section, for output via add on the other hand the object chain of the section reference is used (see also Section references (→Documentation FirstSpirit SiteArchitect)).

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