Start page
Start page

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

#linkAvailable from FirstSpirit Version 4.0Available up to FirstSpirit Version 5.0

The system object #link was necessary for outputting link template types which have been used before FirstSpirit version 5.0. If these legacy link templates are still used in a project, the following warning will be logged in a generation:

WARN  21.12.2011 14:19:50.741 {seID=294348} (de.espirit.firstspirit.store.access.templatestore.LinkTemplateImpl): usage of deprecated old link template \'internal_link.template\' (project=1234, id=5678)

The system object #link is no more required for link templates which are used in FirstSpirit 5.0. Data of link template are output analogous to the output of the used input components. It is deprecated in version 5.0 and should be replaced suitably.

For further information please refer to Chapter Link templates.

Invocations for internal links

Invocation

Meaning

Return data type

#link.comment

Output of the input field: comment (Default labelling: comment)

String
(character string)

#link.language

Output of the input field: language (Default labelling: Language)

String
(character string)

#link.linktemplate

Output of the input field: linktemplate: (Default labelling: link template)

String
(character string)

#link.mediaref

Output of the selection/input field: mediaref (Default labelling: Picture)

String
(character string)

#link.mediaref_remote

Output of the internal field: mediaref_remote. Outputs the symbolic name of the remote project if the selected picture (see #link.mediaref) originates from a remote project.

String
(character string)

#link.section

Output of the selection field: section (Default labelling: Section).

String
(character string)

#link.section_anchor

Output of the internal field: section_anchor. Name of the anchor for the selected section (see #link.section) with preceding #.

String
(character string)

#link.section_id

Output of the internal field: section_id. Name of the unique identifier for the selected section (see #link.section)

String
(character string)

#link.sitestoreref

Output of the selection/input field: sitestoreref (Default labelling: Target).

String
(character string)

#link.sitestoreref_remote

Output of the internal field: sitestoreref_remote. Outputs the symbolic name of the remote project if the selected target (see #link.sitestoreref) originates from a remote project.

String
(character string)

#link.target

Output of the selection/input field: target (Default labelling: Frame)

String
(character string)

#link.text

Output of the input field: text (Default labelling: Link Text)

String
(character string)

   

Invocations for external links

Invocation

Meaning

Return data type

#link.comment

Output of the input field: comment (Default labelling: comment).

String
(character string)

#link.linktemplate

Output of the input field: linktemplate: (Default labelling: link template).

String
(character string)

#link.mediaref

Output of the selection/input field: mediaref (Default labelling: Picture).

String
(character string)

#link.mediaref_remote

Output of the internal field: mediaref_remote. Outputs the symbolic name of the remote project if the selected picture (see #link.mediaref) originates from a remote project.

String
(character string)

#link.ref

Output of the selection/input field: ref (Default labelling: Target address:).

String
(character string)

#link.target

Output of the selection/input field: target (Default labelling: Frame).

String
(character string)

#link.text

Output of the input field: text (Default labelling: Link Text).

String
(character string)

   

Invocations for data links

Invocation

Meaning

Return data type

#link.comment

Output of the input field: comment (Default labelling: comment).

String
(character string)

#link.contentID

Output of the selection/input field: contentID (Default labelling: Data record).

String
(character string)

#link.contentSRC

Output of the selection field: contentSRC (Default labelling: Data source).

String
(character string)

#link.language

Output of the input field: language (Default labelling: Language).

String
(character string)

#link.linktemplate

Output of the input field: linktemplate: (Default labelling: link template).

String
(character string)

#link.mediaref

Output of the selection/input field: mediaref (Default labelling: Picture).

String
(character string)

#link.mediaref_remote

Output of the internal field: mediaref_remote. Outputs the symbolic name of the remote project if the selected picture (see #link.mediaref) originates from a remote project.

String
(character string)

#link.sectiontemplate

Output of the selection field: sectiontemplate (Default labelling: Target template of the search).

String
(character string)

#link.sitestoreref

Output of the selection/input field: sitestoreref (Default labelling: Starting point for the search:).

String
(character string)

#link.target

Output of the selection/input field: target (Default labelling: Frame).

String
(character string)

#link.text

Output of the input field: text (Default labelling: Link Text).

String
(character string)

   

Examples of #link

Several examples of use of the instruction within templates are shown in the following. The examples are intended to clearly show the specific effect of the instruction and provide help for the template developer when creating their own templates.

Important The examples displayed here must be adjusted for use within a project! For example, variable names must be changed to the specific variable names of the project in which the instruction is to be used.

1st Example: Graphic and text link

<a href="$CMS_REF(#link.sitestoreref)$$CMS_VALUE(#link.section_anchor)$"
target="$CMS_VALUE(#link.target)$">
<img src="$CMS_REF(#link.mediaref)$"
alt="$CMS_VALUE(#link.comment)$" />
$CMS_VALUE(#link.text)$
($CMS_VALUE(#link.language)$)
</a>

In the example, an internal link is generated. In the href attribute of the <a> tag, #link.sitestoreref returns the selected page reference from the Site Store and the URL for this page reference is determined with the help of the $CMS_REF(...)$ instruction. The anchor to be navigated to is behind the path to the page reference. The content consists of a picture and a text. The picture selected from the Media Store is displayed as the picture and the comment entered is used as alternative text. The text consists of the entered text and of the language abbreviation (in brackets). If the link is clicked the URL is opened in the defined window (defined via frame) (e.g. _blank).

Exemplary output:

<a href="/preview/671041/show/site/DE/current/671044/681046#contentSelect"
target="Frame">
<img src="/preview/671041/show/media/DE/current/743041/ORIGINAL"
alt="Comment" />
text
(FR)
</a>

© 2005 - 2015 e-Spirit AG | All rights reserved. | Last change: 2013-12-09