I have a property with alias name externalLink. I just want to get it's value in href of anchor tag when its present. This is what I have got so far. But it never gives me the value of externalLink even if it's present.
You're actually doing it right, but the snippet you grabbed for the attribute thing uses the old XML schema (search for it if you want to know about it) - here's how that sample would look:
Getting value of External Link
Hi,
I have a property with alias name externalLink. I just want to get it's value in href of anchor tag when its present. This is what I have got so far. But it never gives me the value of externalLink even if it's present.
Any help will be appreciated.
Thanks
D
Hi,
It looks like you are mixing the new and old schemas. Try replacing "data [@alias='externalLink']" with just "externalLink", ie:
For more info: our.umbraco.org/wiki/reference/xslt/45-xml-schema
-Tom
Hi Dinesh,
You're actually doing it right, but the snippet you grabbed for the attribute thing uses the old XML schema (search for it if you want to know about it) - here's how that sample would look:
I, however, prefer a slightly different approach, using a match template:
/Chriztian
Snappy, Tom! :-)
Tom & Chriztian,
Thanks a lot guys. I am just catching up with XSLT. It works like a charm with your suggestions.
-Dinesh
is working on a reply...