#link
The system object #link is available within link templates.
The individual methods of the system object can be used to output or further edit the fields of the link in the link template (see also Link templates and Output of links ). Which methods are available depends on the respective link type.
Invocations for internal links
Invocation | Meaning | Return data type |
---|---|---|
#link.comment | Output of the input field: comment (Default labelling: comment) | String |
#link.language | Output of the input field: language (Default labelling: Language) | String |
#link.linktemplate | Output of the input field: linktemplate: (Default labelling: link template) | String |
#link.mediaref | Output of the selection/input field: mediaref (Default labelling: Picture) | 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 |
#link.section | Output of the selection field: section (Default labelling: Section). | 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 |
#link.section_id | Output of the internal field: section_id. Name of the unique identifier for the selected section (see #link.section) | String |
#link.sitestoreref | Output of the selection/input field: sitestoreref (Default labelling: Target). | 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 |
#link.target | Output of the selection/input field: target (Default labelling: Frame) | String |
#link.text | Output of the input field: text (Default labelling: Link Text) | String |
Invocations for external links
Invocation | Meaning | Return data type |
---|---|---|
#link.comment | Output of the input field: comment (Default labelling: comment). | String |
#link.linktemplate | Output of the input field: linktemplate: (Default labelling: link template). | String |
#link.mediaref | Output of the selection/input field: mediaref (Default labelling: Picture). | 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 |
#link.ref | Output of the selection/input field: ref (Default labelling: Target address:). | String |
#link.target | Output of the selection/input field: target (Default labelling: Frame). | String |
#link.text | Output of the input field: text (Default labelling: Link Text). | String |
Invocations for data links
Invocation | Meaning | Return data type |
---|---|---|
#link.comment | Output of the input field: comment (Default labelling: comment). | String |
#link.contentID | Output of the selection/input field: contentID (Default labelling: Data record). | String |
#link.contentSRC | Output of the selection field: contentSRC (Default labelling: Data source). | String |
#link.language | Output of the input field: language (Default labelling: Language). | String |
#link.linktemplate | Output of the input field: linktemplate: (Default labelling: link template). | String |
#link.mediaref | Output of the selection/input field: mediaref (Default labelling: Picture). | 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 |
#link.sectiontemplate | Output of the selection field: sectiontemplate (Default labelling: Target template of the search). | String |
#link.sitestoreref | Output of the selection/input field: sitestoreref (Default labelling: Starting point for the search:). | String |
#link.target | Output of the selection/input field: target (Default labelling: Frame). | String |
#link.text | Output of the input field: text (Default labelling: Link Text). | 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.
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 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>