How do I create a menu in xslt?
Hi,
I'm trying to create a menu where the links are based on different subject titles held in an external xml file.
The code needs to step down through the xml file and for every subject page, create a link. I've only managed to get it to read the first entry.
<xsl:variable name="mainSectionName" select="title"/>
<xsl:if test="title = $mainSectionName">
<xsl:variable name="menuItem" select="$mainSectionName"/>
<a href="{$mainSectionUri}"><xsl:value-of select="$menuItem"/></a>
</xsl:if>
At the moment there are only four sections but if the user adds another section, the menu should be updated automatically.
Any help you could give would be greatly appreciated!
Kind regards,
Clare
|