I am trying to make the list display 'No events' if there are no nodes under the 'latest news page'. Each sub page is called 'EventsPage'. I can't seem to get it to display correctly, nothing displays at the moment, just an empty list.
Any help would be much appreciated, thanks in advance :)
ps I know my xslt is pretty poor still, I don't know in which order I should have the commands etc.
Your logic is a little out. You need to do something like this:
<xsl:choose>
<xsl:when test="count($currentPage/ancestor-or-self::node[@level='1']/node[@nodeTypeAlias='EventsPage']) > 0">
Display your events here in a loop
</xsl:when>
<xsl:otherwise>
<ul><li>No events</li></ul>
</xsl:otherwise>
</xsl:choose>
List display events otherwise display no events
Hi, using v 4.0.4.2 and this is my xslt:
I am trying to make the list display 'No events' if there are no nodes under the 'latest news page'. Each sub page is called 'EventsPage'. I can't seem to get it to display correctly, nothing displays at the moment, just an empty list.
Any help would be much appreciated, thanks in advance :)
ps I know my xslt is pretty poor still, I don't know in which order I should have the commands etc.
Sam.
Hi Sam,
Your logic is a little out. You need to do something like this:
Rich
Thanks Rich,
Only just got the time to sort this out. Reworked the xslt and it works a charm :)
Sam.
is working on a reply...