Link attributes
You can influence the behavior of links using a number of optional attributes.
tridion:textonfail(defaulttrue)-
Set to
falseif 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 tofalse. 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).
tridion:type-
The type of the link to be created. The default is
ComponentorPagedepending on the destination URI of thetridion:hrefattribute. For Multimedia Components, usetridion:typeto 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">). Fortridion:type="Binary"you can set a specific binary variant to link to using thetridion:variantidattribute. For more information, see theAddBinary()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 intridion:hrefis replaced. You can specify the target attribute usingtridion:targetattribute. The attribute is only available fortridion:type="Multimedia"and is set tohrefby 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-543is published asImages/logo.gif.If set to
Multimedia, the Multimedia Component must be published in the same publishing action for the link to be resolved.
- If set to