Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I have an xslt template with following code

<ul class="functions selected">
                <xsl:for-each select="functions/function">
                    <li><a href="{@id}"><xsl:value-of select="@title" /></a></li>
                </xsl:for-each>
            </ul>

this xslt is linked to an xml file generated by a TBB, "@title" is the title of a folder in content hirarchy and "@id" is tcmID, after executing all this i get following html rendered.

<a href="tcm:104-27391-2">Test Folder</a>

I want to update the href to an existing page, I have a link resolver tbb but don't know how to use it in my XSLT code. Need some guidance.

share|improve this question
add comment

2 Answers 2

If you want to resolve links in XSLS you need to specify tridion specific attributes for instance you need to replace href with tridion:href. Below a sample.

Sample:

<a tridion:href="{tcmid}" title="{title}">{text}</a>

For multimedia links

<a tridion:href="{tcmid}" tridion:type="Multimedia" title="{title}">{text}</a>
share|improve this answer
add comment

If you're using the link resolver tbb in your compound template this link should be resolved. It's important to ensure that the tbb runs after your xslt template has ran.

If this isn't working I'd recommend trying the syntax <a tridion:href="tcmid" ...>, but I'm pretty sure the default finish actions will pick up the normal href attribute in your tag.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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