I am trying to count the total number of nodes with the nodeTypeAlias='Topic' with this code:
<xsl:variable name="c" select="round(count($currentPage/ancestor-or-self::root//node [@nodeTypeAlias='Topic']/node) div 3)"/>
Now I need to put a condition so that it only counts when a certain node datatype is true
<xsl:variable name="c" select="round(count($currentPage/ancestor-or-self::root//node [@nodeTypeAlias='Topic' and string($currentPage/data[@alias='MoreSports']) = '1']/node) div 3)"/>
But it is not working. Can someone help me with this. Thanks.
Counting the number of nodes with condition
Hi,
I am trying to count the total number of nodes with the nodeTypeAlias='Topic' with this code:
Now I need to put a condition so that it only counts when a certain node datatype is true
But it is not working. Can someone help me with this. Thanks.
Hi gerald,
Try this (getting rid of the extra $currentPage):
/Chriztian
is working on a reply...