Hi all, i have the following piece of inline xslt, to create a link to a flash video, however i'm not sure how to set the title tag. I have an umbraco field called flashVideoHeaderText where i want to specificy the title text. Any ideas?
Inline xslt in an umbraco:Item is meant for simple use cases. It only passes in the field="" parameter. You also have access to the $currentPage parameter. As long as the properties you want to display can be accessed in one of those two ways you're all set.
However... what you're trying to do here is a bit involved and inline xslt is not going to make it clearer. Personally, I'd use an xslt macro instead... it will let you use white space, comments, and will be easier live with in the long-term.
In your example, you want to make an <a> tag with an href and a value. You've got the start of the <a tag, the href, and the title. Then you need to insert the value and close the anchor with an </a>. You've cobbled together everything except the title itself.
It looks as though you have a property on the current page called "caseStudyFlashVideoHeaderText". If that's the case your title= would be:
Title tag in inline xslt
Hi all, i have the following piece of inline xslt, to create a link to a flash video, however i'm not sure how to set the title tag. I have an umbraco field called flashVideoHeaderText where i want to specificy the title text. Any ideas?
<p><umbraco:Item runat="server" field="flashVideo" xslt="concat('<a href="', umbraco.library:GetMedia({0},'true')/data[@alias='umbracoFile'], '" class="flash" title=" "/>')" xsltDisableEscaping="true" /><umbraco:Item field="caseStudyFlashVideoHeaderText" runat="server"></umbraco:Item></a></p>
Inline xslt in an umbraco:Item is meant for simple use cases. It only passes in the field="" parameter. You also have access to the $currentPage parameter. As long as the properties you want to display can be accessed in one of those two ways you're all set.
However... what you're trying to do here is a bit involved and inline xslt is not going to make it clearer. Personally, I'd use an xslt macro instead... it will let you use white space, comments, and will be easier live with in the long-term.
In your example, you want to make an <a> tag with an href and a value. You've got the start of the <a tag, the href, and the title. Then you need to insert the value and close the anchor with an </a>. You've cobbled together everything except the title itself.
It looks as though you have a property on the current page called "caseStudyFlashVideoHeaderText". If that's the case your title= would be:
Hope that helps, though again I'd recommend a macro for clarity and future maintenance.
cheers,
doug.
is working on a reply...