Introducing CXT / Templates / Meta data

Metadata

Table of contents

The CXT concept is based on the assumption that text can be reused in many applications but, ideally, it is adapted to the relevant context, i.e., the personal interests and current situation of the consumer.

The CXT concept supports these content requirements by means of the Variant principle: The substance of all variants of a fragment is identical but they can differ in terms of scope, level of detail, language (simple vs. complex), target group, etc. An important variant dimension is the language of a fragment (German, English, etc.).
Variants can be edited and deployed individually, i.e., independently of their fragment or other variants, in the FragmentCreator (e.g., “EN” language variant is released, whereas the “FR” variant is not released).

The editor enters metadata relating to the variants to make it possible to differentiate between them. This data is queried via a special template, the “metadata template”. In principle, the metadata is a mandatory part of a fragment.

Unlike the content data that is entered via the fragment templates, this data is organizational data.

The FirstSpirit SiteArchitect is required for configuration, as templates cannot be created and edited in the FragmentCreator.

Creating a page template

Editors create content in CXT using forms which are based on page templates (see also Page templates (→FirstSpirit Online Documentation)).

The metadata template is a special kind of page template.

Minimal configuration

<CMS_MODULE>

<FS_TAGGING name="tags" useLanguages="no">
<LANGINFOS>
<LANGINFO lang="*" label="Tags" description="Tags"/>
</LANGINFOS>
</FS_TAGGING>

<CMS_INPUT_TEXT name="title" useLanguages="no">
<LANGINFOS>
<LANGINFO lang="*" label="Description"/>
<LANGINFO lang="DE" label="Beschreibung"/>
</LANGINFOS>
</CMS_INPUT_TEXT>

<CMS_GROUP name="editions">
<LANGINFOS>
<LANGINFO lang="*" label="Variants"/>
<LANGINFO lang="DE" label="Varianten"/>
</LANGINFOS>

<CMS_INPUT_COMBOBOX name="language" preset="copy" useLanguages="no">
<ENTRIES>
<ENTRY value="DE">
<LANGINFOS>
<LANGINFO lang="*" label="German"/>
<LANGINFO lang="DE" label="Deutsch"/>
</LANGINFOS>
</ENTRY>
<ENTRY value="EN">
<LANGINFOS>
<LANGINFO lang="*" label="English"/>
<LANGINFO lang="DE" label="Englisch"/>
</LANGINFOS>
</ENTRY>
</ENTRIES>
<LANGINFOS>
<LANGINFO lang="*" label="Language"/>
<LANGINFO lang="DE" label="Sprache"/>
</LANGINFOS>
</CMS_INPUT_COMBOBOX>

</CMS_GROUP>

</CMS_MODULE>

The various components of this minimal configuration are explained below:

Component for Tagging

Fragments and variants are created and managed regardless of context (e.g., a website or navigation structure).
Tags are used to organize and sort fragments and variants based on specific topics. Tags are additional information that is saved for a variant. For example, instead of storing all variants relating to “FirstSpirit” in a specific folder, it is sufficient to give the corresponding variants the “firstspirit” tag. This tag will allow variants / fragments to be found later on.

  • Required input component type: FS_TAGGING
  • Mandatory identifier of the input component: tags

Component for the Title

Every variant requires a title.

  • Required input component type: CMS_INPUT_TEXT
  • Mandatory identifier of the input component: title

The corresponding input component is displayed in every variant. It is pre-assigned the value New fragment by the system. This value is saved for the variant if the editor does not enter a different title.

Components for Variants

In order to save different variants for a fragment, corresponding components must be defined in the metadata template.

  • Required input component type: CMS_GROUP
  • Mandatory identifier of the input component: editions
  • Only multi-value components are supported
    (e.g. COMBOBOX, CHECKBOX, RADIOBUTTON, TOGGLE).

The CMS_GROUP definition defines the input components that are to be used to enter the individual variant dimensions.
An important variant dimension is the language of a fragment (German, English, etc.). See the following section for more information.

Example: Multilingual content

In order to save the language selection for a variant (i.e., which language a variant applies to), e.g., CMS_INPUT_COMBOBOX or CMS_INPUT_RADIOBUTTON can be used (COMBOBOX (→FirstSpirit Online Documentation) or RADIOBUTTON (→FirstSpirit Online Documentation)).

The codes for the required languages should be specified as values (value attribute within ENTRIES / ENTRY) and the required language label is specified via the LANGINFOS definition.

Important If the fragment project is used in combination with classic FirstSpirit projects, the languages and language codes should be identical across the projects to ensure correct operation.

A language should be preselected for initial display purposes and for the creation of the first variant of a fragment. Configuration is carried out via the “Default values” icon on the “Form” tab of the metadata template (see illustration). Select and save the desired language in the relevant dialog.

The preset attribute must be set to copy so that the value chosen by the editor can be saved and will not be overwritten.
For more information, see Default values (→FirstSpirit Online Documentation).

"Rules" tab

FirstSpirit template developers can use rules or “dynamic forms” to support and guide editors when they are entering editorial content. Editors can be made aware of invalid entries, for example.

For more information, see Checking content ("Rules" tab).

Definition in the project properties

This page template must then be selected as the metadata template in the project properties in ServerManager (“Options” menu, “Metadata template” field).

For more information, see Creating a fragment project.

Use in snippets

Content that is maintained via this template can be accessed in the “snippets” of other templates via the #meta system object. See also Displaying content ("Snippet" tab).

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