Subject: How do I create a menu in xslt?
Posted By: TrixiePix Post Date: 12/8/2005 10:22:06 AM
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


Go to topic 37417

Return to index page 420
Return to index page 419
Return to index page 418
Return to index page 417
Return to index page 416
Return to index page 415
Return to index page 414
Return to index page 413
Return to index page 412
Return to index page 411