Probably a simple problem, but I could use a second pair of eyes.
I have some xslt - see below
<xsl:variable name="totalcount"> <xsl:choose> <xsl:when test="$currentPage/@parentID = '1066'"> <xsl:value-of select="count($currentPage/node [string(data [@alias='umbracoNaviHide']) != '1'])"/> </xsl:when> <xsl:otherwise> <!--this is being called from the events by country page, count all the matching events for that country--> <xsl:value-of select="99" /> </xsl:otherwise> </xsl:choose> </xsl:variable>
xx<xsl:value-of select="$totalcount"/>xx
If the parent id is 1066 this returns the number of nodes below that page.
If the parent id is not 1066 it should return the number 99.
But for some reason it only ever returns "0", and i'm damned if I can see why.
Probably a simple problem, but I could use a second pair of eyes.
I have some xslt - see below
If the parent id is 1066 this returns the number of nodes below that page.
If the parent id is not 1066 it should return the number 99.
But for some reason it only ever returns "0", and i'm damned if I can see why.
what have I missed?
I've worked it out. I shouldn't be using a value-of statement in my "otherwise" branch, an xsl text would do it.
An <xsl:text> is a good solution.
Alternatively, you could use
Note the single quote marks inside the select statement.
cheers,
doug.
aha! Thanks Doug!
is working on a reply...