The @level attribute of a node should have nothing to do with a browser, it's stored in the XML. Are you sure the actual @level value is different, or are you just seeing incorrect menu indentations? I would guess there is some type of markup issue (an unclosed or blank ul/li getting self closed, or something similar). Perhaps you could post your XSLT?
Sorry for delay , the code below is what we were doing however we found the<xsl:if test="@level >= $minLevel and (@level <= $maxLevel) and string(umbracoNaviHide) = '0' "> statement was redundant in the <xsl:template match="*[@isDoc]"> template , so simply ended up removing that and then it behaved correctly however there was a definite difference in behaviour between the different browsers that was not the case with the code in earlier versions.
<xsl:template match="/">
<!-- Main UL -->
<ul>
<xsl:attribute name="id">
<xsl:value-of select="$ulMainId"/>
</xsl:attribute>
<!-- consider all the children of the ancestor on (minLevel - 1) -->
Hi - I would guess that with that line in place an empty <ul></ul> was getting written out somewhere which can behave different on different browsers. Anyway, glad you got it sorted!
xslt @level behaviour in 4.7 varies between browsers
Hi
we have ported one of our site from 4.6 to 4.7 however we have found an issue with an xslt that is using the @level property in its logic.
Basically what happens is that IE is reading it correctly the node level however Firefox is reading each item on the first level as its own level
Example
Hi Alex,
The @level attribute of a node should have nothing to do with a browser, it's stored in the XML. Are you sure the actual @level value is different, or are you just seeing incorrect menu indentations? I would guess there is some type of markup issue (an unclosed or blank ul/li getting self closed, or something similar). Perhaps you could post your XSLT?
-Tom
Hi
Sorry for delay , the code below is what we were doing however we found the<xsl:if test="@level >= $minLevel and (@level <= $maxLevel) and string(umbracoNaviHide) = '0' "> statement was redundant in the <xsl:template match="*[@isDoc]"> template , so simply ended up removing that and then it behaved correctly however there was a definite difference in behaviour between the different browsers that was not the case with the code in earlier versions.
<xsl:template match="/">
<!-- Main UL -->
<ul>
<xsl:attribute name="id">
<xsl:value-of select="$ulMainId"/>
</xsl:attribute>
<!-- consider all the children of the ancestor on (minLevel - 1) -->
<xsl:apply-templates select="$currentPage/ancestor-or-self::*[@isDoc] [@level=($minLevel -1)]/*[@isDoc] [string(umbracoNaviHide) = '0']" />
</ul>
</xsl:template>
<xsl:template match="*[@isDoc]">
<xsl:if test="@level >= $minLevel and (@level <= $maxLevel) and string(umbracoNaviHide) = '0' ">
<li>
<!-- active on first level -->
<xsl:if test="(@level = $minLevel) and ($currentPage/@id = current()/@id)">
<xsl:attribute name="id">
<xsl:value-of select="$liActiveId"/>
</xsl:attribute>
</xsl:if>
<!-- URL -->
<a href="{umbraco.library:NiceUrl(@id)}">
<!-- active on inner levels -->
<xsl:if test="$currentPage/@id = current()/@id and (@level > $minLevel)">
<xsl:attribute name="class">
<xsl:value-of select="$linkActiveClass"/>
</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="string-length(NavTitle) > 0">
<xsl:value-of select="NavTitle"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="Title"/>
</xsl:otherwise>
</xsl:choose>
</a>
<!-- has visible children -->
<xsl:if test="(count(*[@isDoc][string(umbracoNaviHide) = '0']) > 0)">
<ul>
<xsl:attribute name="class">
<xsl:value-of select="$ulSubClass"/>
</xsl:attribute>
<!-- reapply the template -->
<xsl:apply-templates select="*[@isDoc]"/>
</ul>
</xsl:if>
</li>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Hi - I would guess that with that line in place an empty <ul></ul> was getting written out somewhere which can behave different on different browsers. Anyway, glad you got it sorted!
Yeah probably something like that , thanks for the help
is working on a reply...