Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have the following in my content structure
These are attributes of a holiday.
Pool & Sports have the same DocType as do Private, football etc.
I use ONE Multi node tree picker to pick these, so the holiday attribute could be 1,6,9
What I would like to display via xslt in this case is
Pool
* Private
* Indoor
Sports
* Tennis
I can loop though Pool & Sports and then work out what nodes to display ok.
My problem is how to NOT show Sports if the holiday attribute was 1,6 (ie the are no Sports attributes)
Not sure this makes much sense, hard to explain!
Any ideas appreciated
Rich
Solved it by getting some sleep ;)
<xsl:variable name="absoluteRoot" select="$currentPage/ancestor-or-self::root" /> <xsl:variable name="allAttributes" select="concat(',',$currentPage/propertyAttributes,',')" /> <xsl:for-each select="$absoluteRoot/descendant::* [name() = 'ConfigPropertyAttributeType' and string(umbracoNaviHide) != '1']"> <xsl:variable name="propAttributes"> <xsl:for-each select="./* [name() = 'PropertyAttribute' and string(umbracoNaviHide) != '1']"> <xsl:if test="contains($allAttributes,concat(',',@id,','))"> <li><xsl:value-of select="@nodeName"/></li> </xsl:if> </xsl:for-each> </xsl:variable> <xsl:if test="$propAttributes !=''"> <ul><xsl:value-of select="@nodeName"/> <xsl:value-of select="$propAttributes" disable-output-escaping="yes"/> </ul> </xsl:if> </xsl:for-each>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
xslt problem - stumped
I have the following in my content structure
These are attributes of a holiday.
Pool & Sports have the same DocType as do Private, football etc.
I use ONE Multi node tree picker to pick these, so the holiday attribute could be 1,6,9
What I would like to display via xslt in this case is
Pool
* Private
* Indoor
Sports
* Tennis
I can loop though Pool & Sports and then work out what nodes to display ok.
My problem is how to NOT show Sports if the holiday attribute was 1,6 (ie the are no Sports attributes)
Not sure this makes much sense, hard to explain!
Any ideas appreciated
Rich
Solved it by getting some sleep ;)
is working on a reply...