我在Umbraco中的菜单宏中遇到问题。
我的宏返回一个带有 li 元素的 ul,每页一个。
<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>
我遇到的问题是两个页面是重复的,即使我每个页面只有一个,并且它们上面的链接有效并指向同一页面。
我还有另一个问题,那就是最后一个 li 元素被放错了,但仅在 Firefox 上......Chrome和Safari工作正常...
有什么想法吗?
解决方案非常简单,只需"重新发布整个网站",所有问题都是历史。我的猜测是有些东西卡在缓存中......