I haven't been able to change my "$currentPage/youTubeURL" into something that (if empty) will look to the parent for a value. Should I be writing something like your solution above? Im using 4.7
Seems to be closer to the answer that I am looking for.. but I havent gotten quite working to pull info from from my home node if a child node hasn't provided its own info..
Just want to give thanks to Chriztian Steinmeier
, between this post and some others by him I was able to get this
knocked out. Probably a lot sooner if I had figured out I needed to
republish everyting.. but oh well.. new troubleshooting lesson learned.
Get parent node when child is empty
Hi all
I have the following
<xsl:template match="/">
<img>
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:GetMedia($currentPage/bannerImage, 'false')/umbracoFile" />
</xsl:attribute>
</img>
</xsl:template>
However this only works if the currentpage has a bannerImage.
I need this get the bannerImage from the parent if the child page does not have anything in bannerImage
Thanks
J
Hi juliang,
Here's the XSLT equivalent of the "recursive" option for properties:
/Chriztian
Great!
I had managed to workaround it but very inefficienly. Still feeling my way with xslt
Thanks a lot
Julian
@Chriztian
Hi, I'm looking to do something similar with a "recursive" value (see code below)
I haven't been able to change my "$currentPage/youTubeURL" into something that (if empty) will look to the parent for a value. Should I be writing something like your solution above? Im using 4.7
See this old, but still great post about recursion in xslt
http://forum.umbraco.org/yaf_postst2751_XSLT-Tip--Display-a-field-recursively.aspx
Petr
@Petr - yeah I was looking at that article earlier, but I'm pretty sure that's based on the old scheme which doesn't work for me since Im using 4.7
Seems to be closer to the answer that I am looking for.. but I havent gotten quite working to pull info from from my home node if a child node hasn't provided its own info..
Ok solved.. it required that I re-publish all of the pages for the change to take effect but my final solution is as follows:
Just want to give thanks to Chriztian Steinmeier , between this post and some others by him I was able to get this knocked out. Probably a lot sooner if I had figured out I needed to republish everyting.. but oh well.. new troubleshooting lesson learned.
is working on a reply...