Copied to clipboard

Flag this post as spam?

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


  • Kasper Dyrvig 246 posts 379 karma points
    Nov 12, 2010 @ 09:43
    Kasper Dyrvig
    0

    The sub menu disappears when current page has child nodes...

    This is very weird and irritating error...

    Here is the code:

      <xsl:if test="$currentPage/menuShowSub != '0'">
        <xsl:if test="$currentPage/@nodeType = '1101' or umbraco.library:GetXmlNodeById($currentPage/@parentID)/@nodeType = '1101'">
          <span>We also have:&nbsp;&nbsp;</span>
        </xsl:if>
        <xsl:choose>
          <xsl:when test="count($currentPage/* [@isDoc and umbracoNaviHide != '1']) &gt; 0">
            <xsl:for-each select="$currentPage/* [@isDoc and umbracoNaviHide != '1' and menuSelectSub != '0']">
              <a href="{umbraco.library:Replace(umbraco.library:NiceUrl(@id), '.aspx', '')}">
                <xsl:if test="$currentPage/@id = @id">
                  <xsl:attribute name="class">
                    <xsl:value-of select="'clicked'"/>
                  </xsl:attribute>
                </xsl:if>
                <xsl:value-of select="@nodeName"/></a><xsl:if test="position() != last()">,&nbsp;&nbsp;</xsl:if>
            </xsl:for-each>
          </xsl:when>
          <xsl:otherwise>
            <xsl:if test="count(umbraco.library:GetXmlNodeById($currentPage/@parentID)/* [@isDoc and umbracoNaviHide != '1']) &gt; 0">
              <xsl:for-each select="umbraco.library:GetXmlNodeById($currentPage/@parentID)/* [@isDoc and umbracoNaviHide != '1' and menuSelectSub != '0']">
                <a href="{umbraco.library:Replace(umbraco.library:NiceUrl(@id), '.aspx', '')}">
                  <xsl:if test="$currentPage/@id = @id">
                    <xsl:attribute name="class">
                      <xsl:value-of select="'clicked'"/>
                    </xsl:attribute>
                  </xsl:if>
                  <xsl:value-of select="@nodeName"/></a><xsl:if test="position() != last()">,&nbsp;&nbsp;</xsl:if>
              </xsl:for-each>
            </xsl:if>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:if>

    Here is the problem:

    It actually works fine, but the whole menu disappears when the current page has child nodes!?! It works on all other pages. Any ideas? (if you have an idea to simplify the code that is also welcome)

    Thank you!

  • Kasper Dyrvig 246 posts 379 karma points
    Nov 16, 2010 @ 14:24
    Kasper Dyrvig
    0

    I'm still searching for a solution for this...

  • Kasper Dyrvig 246 posts 379 karma points
    Nov 19, 2010 @ 11:23
    Kasper Dyrvig
    0

    Well... I solved it by creating the menu in another way...

Please Sign in or register to post replies

Write your reply to:

Draft