Start page
Start page

Start page / Template development / Link templates / Usage

Using link templates

Link templates cannot be used directly by the editor in FirstSpirit like page, section or table templates, but are instead included in some FirstSpirit input components, which in turn are used in page, section or table templates.

The editor can use special input components that are available primarily for maintaining links:

but also components in which links are maintained in addition to other editorial content (text, images, etc.):

By default, all link templates in the project are available to the editor for selection in these input components. The input components provide relevant tags to limit the selection, such as

  • LINKEDITORS / LINKEDITOR
    for CMS_INPUT_LINK, CMS_INPUT_DOM, CMS_INPUT_DOMTABLE and CMS_INPUT_IMAGEMAP
  • TEMPLATE / uid
    for FS_LIST

CMS_INPUT_DOM input component example:

  <CMS_INPUT_DOM ...>
...
<LINKEDITORS>
<LINKEDITOR name="internalLink"/>
<LINKEDITOR name="externalLink"/>
</LINKEDITORS>
...
</CMS_INPUT_DOM>

FS_LIST input component example:

  <FS_LIST ...>
<DATASOURCE type="inline" ...>
...
<TEMPLATES source="linktemplates">
<TEMPLATE uid="internalLink"/>
<TEMPLATE uid="externalLink"/>
</TEMPLATES>
</DATASOURCE>
...
</FS_LIST>

Language dependency

Input components in a link template can always be defined only independently of a language (useLanguages="no" parameter). If language-dependent content is to be entered for links, the (external) input components used (such as CMS_INPUT_DOM or FS_LIST) must be defined as language-dependent (useLanguages="yes"). This is the default configuration in the case of FS_LIST, INLINE type.

Example of a list with multiple language links

<FS_LIST name="st_fslist_languagedependent" height="200" rows="3">
<DATASOURCE type="inline" useLanguages="yes">
<LABELS>
<LABEL lang="*">#item.lt_text</LABEL>
</LABELS>
<ACTIONS>
<ACTION name="EDIT"/>
<ACTION name="ADD"/>
<ACTION name="UP"/>
<ACTION name="DOWN"/>
<ACTION name="REMOVE"/>
</ACTIONS>
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
<LAYOUT>
<ADD component="toolbar" constraint="top"/>
<ADD component="overview" constraint="bottom"/>
<ADD component="simpleview" constraint="hide"/>
</LAYOUT>
<TEMPLATES source="linktemplates"/>
</DATASOURCE>
<LANGINFOS>
<LANGINFO lang="DE" label="Verweisliste sprachabhängig"/>
<LANGINFO lang="*" label="Link list language dependent"/>
</LANGINFOS>
</FS_LIST>

The links in this configuration can contain different information (e.g. link targets, link text) in the different project languages. In addition, the lists in the different languages can have a different number of links.

For multi-language links in the FS_LIST input component, also refer to FS_LIST, INLINE type, useLanguages parameter.

Example of a list with single language links

<FS_LIST name="st_fslist_languageindependent" height="200" rows="3">
<DATASOURCE type="inline" useLanguages="no">
<LABELS>
<LABEL lang="*">#item.lt_text</LABEL>
</LABELS>
<ACTIONS>
<ACTION name="EDIT"/>
<ACTION name="ADD"/>
<ACTION name="UP"/>
<ACTION name="DOWN"/>
<ACTION name="REMOVE"/>
</ACTIONS>
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
<LAYOUT>
<ADD component="toolbar" constraint="top"/>
<ADD component="overview" constraint="bottom"/>
<ADD component="simpleview" constraint="hide"/>
</LAYOUT>
<TEMPLATES source="linktemplates"/>
</DATASOURCE>
<LANGINFOS>
<LANGINFO lang="DE" label="Verweisliste sprachunabhängig"/>
<LANGINFO lang="*" label="Link list language independent"/>
</LANGINFOS>
</FS_LIST>

In this configuration, all links of the list include the same information (e.g. link target, link text) in all project languages and the number of links for the lists are identical in all project languages.

© 2005 - 2014 e-Spirit AG | All rights reserved. | Last change: 2013-03-14