1

Is there any way other then standard anchor tridion href to read component links from the Component using Dreamweaver Template.

For example we use below code to resolve component link

<a tridion:href="@@mainactivitylink1.Link.ID@@" style="display:none" id="select1">@@mainactivitylink1.LinkText@@</a>

And it gets rendered in the browser as

<a href="/en/applications/contests.jsp" style="display:none" id="select1">Contests</a>

In the Server after processing by the Deployer we get

<tridion:ComponentLink pageURI="tcm:63-9966-64" componentURI="tcm:63-10289" templateURI="tcm:0-0-0" addAnchor="false" linkText="Contests" linkAttributes=" style=&#34;display:none&#34; id=&#34;select1&#34;" textOnFail="true"/> 

we do not want these Tridion Component Link Custom tags in the server, is there any way to have final html links created directly in the DWT by a funtion or in the final jsp after in the server ? i want proper html for the component links in the jsp (like we get in the razor templating by predefined functions)

  • Can you clarify the question? What exactly would you like to achieve? – Quirijn Jan 7 at 12:41
0

In Dreamweaver template? No. This is because dwt doesn't resolve links. Links are resolved in other template building blocks in Default Finish Action blocks. So what are your options? You can add placeholders in DWT and resolve links by yourself, or extend links resolving in these blocks. You can also create a custom server tag and then resolve it at request time. It all depends on what you want to achieve.

0

We got the solution for this, actually a hack for DWT, we used Razor Mediator CT "Get Internal URL CT" and TBB "Get Internal Url" , and changed DWT Logic to below

<a href="@@RenderComponentPresentation(pagesubmitcomponent.ID , 'tcm:63-156395-32')@@" id="pagesubmit_sys_link" style="display:none">&nbsp;</a>

Where pagesubmitcomponent.ID is the tcm id of the linked component, and tcm:63-156395-32 is the id of a CT , which is same as a Razor Mediator CT "Get Internal URL CT" , so it resolved the internal link and give the final output as below :

<a href="/en/applications/contests.jsp" style="display:none" id="select1">Contests</a>

Thanks to Razor mediators

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.