For my ASP.Net-based Tridion2011-powered site i need to replace standard generated <tridion:ComponentLink/> with some <custom:ComponentLink/>.
(Let's assume this custom control's semantics is the same, that is: only need to replace namespace part.)
What will be the simplest and least intrusive way to do this?
My guess is that i should implement an alternative to standard LinkTagHandler. Is it correct?
The only [infinitesimal] downside of this solution is that it will require explicitly configuring all tag handlers in cd_deployer_conf.
EDIT
Found a dumb simple solution to the very specific task of aliasing namespace only:
<TCDLEngine>
<Properties>
<Property Name="aspnet.tagprefix" Value="custom"/>
</Properties>
</TCDLEngine>
By a lucky chance all my <tcdl:../>
tags got mapped to <custom:../>
, otherwise, this little cheat not gonna work.
Overall, i'm rather in favor of Peter's and Nuno's suggestions of creating custom TCDL tag handler..
(Just need to win over my laziness:-).
EDIT 2
Oops, just noticed, that Nuno suggests exactly the above!
Yes, I recommend creating your own TCDL tag handler to output your custom control instead of the default. There's another potential downside, though: you'll need to republish your Pages / Components for it to take effect.
You can easily control the prefix by changing it in the cd_deployer_conf (in the TCDLEngine element).
Obviously, you'll need to take care of implementing the control/tag handler for that prefix, and republish every page/dcp that should use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With