Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • drewho 3 posts 24 karma points
    Nov 17, 2009 @ 12:11
    drewho
    0

    Selected State

    Hi Tim

    If i use the "forceNode" setting in any of my menus the selected state seems to stop working, looking at the rendered code on the page, the link seems to be missing the .selected css if the "forceNode" setting is used.

    If i remove the "forceNode" setting from the menu and the selected states works.

    (Using the default xsl and css from the download)

  • drewho 3 posts 24 karma points
    Nov 17, 2009 @ 15:34
    drewho
    0

    just to update, i got it working by changing the forceNode code to:


      <xsl:choose>
        <xsl:when test="$forceNode = $currentPage/ancestor::node/@id">
              <xsl:variable name="currentNode" select="$currentPage [string(data [@alias='umbracoNaviHide']) != '1']"></xsl:variable>
          <xsl:call-template name="nodeIterator">
            <xsl:with-param name="parentNode" select="$currentNode/ancestor-or-self::node[@level=$startLevel]" />
            <xsl:with-param name="pseudoCurrentPage" select="$currentNode" />
          </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <xsl:variable name="currentNode" select="umbraco.library:GetXmlNodeById($forceNode)"></xsl:variable>
          <xsl:call-template name="nodeIterator">
            <xsl:with-param name="parentNode" select="$currentNode/ancestor-or-self::node[@level=$startLevel] [string(data [@alias='umbracoNaviHide']) != '1']" />
            <xsl:with-param name="pseudoCurrentPage" select="$currentNode" />
          </xsl:call-template>
        </xsl:otherwise>
      </xsl:choose>

  • drewho 3 posts 24 karma points
    Nov 17, 2009 @ 15:37
    drewho
    1

    oops sorry...to this:

      <xsl:choose>
        <xsl:when test="$forceNode = $currentPage/ancestor::node/@id">
              <xsl:variable name="currentNode" select="$currentPage [string(data [@alias='umbracoNaviHide']) != '1']"></xsl:variable>
          <xsl:call-template name="nodeIterator">
            <xsl:with-param name="parentNode" select="$currentNode/ancestor-or-self::node[@level=$startLevel]" />
            <xsl:with-param name="pseudoCurrentPage" select="$currentNode" />
          </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
          <xsl:variable name="currentNode" select="umbraco.library:GetXmlNodeById($forceNode) [string(data [@alias='umbracoNaviHide']) != '1']"></xsl:variable>
          <xsl:call-template name="nodeIterator">
            <xsl:with-param name="parentNode" select="$currentNode/ancestor-or-self::node[@level=$startLevel]" />
            <xsl:with-param name="pseudoCurrentPage" select="$currentNode" />
          </xsl:call-template>
        </xsl:otherwise>
      </xsl:choose>

  • Tim 225 posts 690 karma points
    Nov 19, 2009 @ 13:47
    Tim
    0

    Great thanks, for finding the bug and fir fixing it I'll roll your changes into the next release.

    Tim

Please Sign in or register to post replies

Write your reply to:

Draft