Lets say I have a component using a set schema, and this component is used with two opposing component templates, for example:
Component: Product A
Template One: Product Marketing
Template Two: Product Support
Through dynamic component linking, I want to be able to use the component’s tcm uri to specify a hyperlink to where the content resides (using a dreamweaver template i.e. <a href="tcm:11-xxxx">Link text</a>)
The problem is though that if links are being generated to the wrong parts of the website I’m working on, i.e. links to product support in the product marketing section and vice versa.
I’ve tried setting the linking priority of the templates…both set to high….but Tridion seems to use the last template that was published for deciding where links should go.
Plus if I set one of the templates to medium and the other to high, it just takes the links to the content using the template with highest priority (i.e. all links going to product support, even in the product marketing section)
Does anyone know how to solve this? Thanks!
In addition to Chris comments, You can use the tridion:excludetemplateuri attribute to exactly control which Component Template you can link to depending on the your need either marketing or support.
in DWT.. you could use something like this.
Here is the link for reference