Documentation Center

Link attributes

You can influence the behavior of links using a number of optional attributes.

tridion:textonfail (default true)
Set to false if you want the link text to be removed if the link cannot be resolved on the published Web site. For example, if your link text is "Click here to read more", it makes sense to set this attribute to false.
tridion:excludetemplateuri
Set to the value of a Component Template. This link should never point to a rendered Component that was rendered using this Component Template.
tridion:anchor
For page links, specify the HTML anchor to add to a page link URL (the default is an empty string).
for component links, specify a Boolean indicating whether or not a component index is added to the link as an HTML anchor (the default is false).
tridion:type
The type of the link to be created. The default is Component or Page depending on the destination URI of the tridion:href attribute. For Multimedia Components, use tridion:type to distinguish between the following:
  • If set to Binary, the hyperlink points to the binary file contained within the Multimedia Component, which means that the link points to the actual published binary file and not the Content Manager URI of the item (for example, <a href="Image.jpg">). For tridion:type="Binary" you can set a specific binary variant to link to using the tridion:variantid attribute. For more information, see the AddBinary() command in the TOM.NET API reference documentation.
  • If set to Multimedia, the original HTML element is retained; only the target attribute to the published path of the Multimedia Component referenced in tridion:href is replaced. You can specify the target attribute using tridion:targetattribute. The attribute is only available for tridion:type="Multimedia" and is set to href by default. For example,
    <img src="dummy2.jpg" tridion:href="tcm:6-543" tridion:type="Multimedia" 
    	tridion:targetattribute="src" alt="alternate text">

    is converted to

    <img src="/Images/logo.gif" alt="alternate text">

    assuming that tcm:6-543 is published as Images/logo.gif.

    If set to Multimedia, the Multimedia Component must be published in the same publishing action for the link to be resolved.