Reputation: 711
I'm having problems with a menu macro in Umbraco..
My macro returns a ul with li elements, one for each page.
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:param name="currentPage"/>
<xsl:variable name="level" select="1"/>
<xsl:template match="/">
<ul>
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:if test="$currentPage/ancestor-or-self::*/@id = current()/@id">
<xsl:attribute name="class">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
The problem that I've encountered is that two pages are duplicated even though I only have one of each and the links on them work and point ot the same page.
I also have another problem and that is that the last li element is missplaced, but only on Firefox...Chrome and Safari work fine...
Any ideas?
Upvotes: 0
Views: 353
Reputation: 711
The solution was annoyingly simple, just "republish entire site" and all problems were history. My guess is that some stuff got stuck in the cache...
Upvotes: 1