Hyperlinks
Hyperlinks can be inserted by making use of the "a" or the "link" tags. Usage:
<a href="" [view=""] [target=""] [ class=""] [title=""] [id=""] [custom_parameter="" [...] ]>Example.</a>
or
<link href="" [view=""] [target=""] [ class=""] [title=""] [id=""] [custom_parameter="" [...] ]>Example.</link>
The "href" parameter is required and it must be set to a valid address (either external or internal).
The "view" parameter will only have effect when used together with internal links (see below). This parameter makes it possible to specify the view that will be used when the node (or object) which the internal link points to is shown. By default, the system always uses the "full" view to show the contents of internal links.
The "target" parameter can be used to control how the target URL should be opened (inside the existing/active browser window/tab or within a new window/tab). The "class" parameter can be used to specify a CSS class that should be used when the link is rendered. The "title" parameter can be used to specify a short title text (will be shown when the pointer is hovering over the link). The "id" parameter is for assigning unique identifiers.
The custom parameters are optional. Their names must be specified using the "CustomAttributes[]" array in the [link] block within an override for the "content.ini" configuration file. When used, a custom parameter will be available as a template variable with the same name as it was specified in the tag itself.
Internal links
It is possible to create internal links (to other nodes and objects) by making use of the "eznode://" and the "ezobject://" notation. The internal links will be created dynamically based on the node/object ID numbers. In other words, if a node is moved, the link(s) will point to the new location(s) and thus they will not be broken.
Link to a node
A link to a node can be created either by specifying the target node's ID number or the node path. The following examples demonstrate how an internal link to node number 128 can be created.
<a href="eznode://128">Example.</a>
or
<link href="eznode://128">Example.</link>
The following examples demonstrate how an internal link to a node located at "products/computers/example" can be created.
<a href="eznode://products/computers/example">Example.</a>
or
<link href="eznode://products/computers/example">Example.</link>
Link to an object
The following examples demonstrate how an internal link to object number 1024 can be created.
<a href="ezobject://1024">Example.</a>
or
<link href="ezobject://1024">Example.</link>
When object linking is used, the destination address will be generated using the main node assignment of the target object.
Alternate views
The "view" parameter can be used together with both "eznode://" and "ezobject://" links. It makes it possible to display the specified node (if object, its main node will be used) using a specific view instead of the default "full" view. The following example shows how to create an internal link that (when clicked/followed) brings up node number 1024 using the "line" view.
<a href="eznode://1024" view="line">Example (as line).</a>
Balazs Halasy (10/03/2005 11:48 am)
Svitlana Shatokhina (05/07/2007 8:51 am)
Comments
There are no comments.