Again, you dig me out of a hole Lee, thanks. I definitely need to read up on XPath and more on XSLT in general as I'm doing some pretty involved stuff at the moment and seem to get stuck with it every 2 minutes! Speaking of which... I implemented the code above but it's not returning anything still. The whole code is as follows (employs your media checking script from your earlier post today):
It should be putting the $galleryName value into the title attribute of the anchor and the image tags, but it's just blank. It can't be due to casing this time as @nodeName is part of the umbraco core library, so I'm confused.
Get name of parent node
Hi,
Can anyone see how to get this working? I'm selecting all nodes with particular tags, but I want to include the name of the parent node with them:
I just can't get the value for 'galleryName' to return anything, so it's probably a syntax problem with that line.
Thanks all...
Hi Dan,
Try, "parent::node":
You can read more about XPath Axes here:
http://www.w3schools.com/xpath/xpath_axes.asp
Cheers, Lee.
Oops, sorry, didn't look at the XSLT properly. (my bad)
Do this:
It's not in the "data" node, but an attribute of the "node" node instead.
Cheers, Lee.
Again, you dig me out of a hole Lee, thanks. I definitely need to read up on XPath and more on XSLT in general as I'm doing some pretty involved stuff at the moment and seem to get stuck with it every 2 minutes! Speaking of which... I implemented the code above but it's not returning anything still. The whole code is as follows (employs your media checking script from your earlier post today):
It should be putting the $galleryName value into the title attribute of the anchor and the image tags, but it's just blank. It can't be due to casing this time as @nodeName is part of the umbraco core library, so I'm confused.
We must have cross-posted there sorry. Your second solution works perfectly, thanks again!
or
is working on a reply...