Copied to clipboard

Flag this post as spam?

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


  • Zaldy Bambao 7 posts 27 karma points
    Mar 14, 2011 @ 16:55
    Zaldy Bambao
    0

    Not getting the correct header in navigation child lists

    I am not getting the proper parent menu item for my navi list.

    title one
        subtitle one
        subtitle two
        subtitle three

    subtitle one
        subtitle two-one
        subtitle two-two
        subtitle two-three

    instead of subtitle two showing up as header for the navi list, subtitle one instead shows up.

    Thanks.

     

    <!-- start writing XSLT -->
      <xsl:variable name="items2" select="$currentPage/ancestor-or-self::* [@isDoc and @level = 3]/* [@isDoc and string(umbracoNaviHide) != '1']"/>

      <!-- 3rd level navigation -->
      <xsl:if test="count($items2) &gt; 0">
      <xsl:variable name="header" select="$currentPage/ancestor-or-self::* [@isDoc and @level = 2]/* [@isDoc and string(umbracoNaviHide) != '1']"/>
      <h3>
        <xsl:value-of select="$header/@nodeName"/>
      </h3>
        <ul>
          <xsl:for-each select="$items2">
            <li>
              <a href="{umbraco.library:NiceUrl(@id)}">
              <xsl:value-of select="@nodeName"/>
            </a>

    <!-- 4th level navigation -->
      <xsl:variable name="items3" select="./ancestor-or-self::* [@isDoc and @level = 4]/* [@isDoc and string(umbracoNaviHide) != '1']"/>
      <xsl:if test="count($items3) &gt; 0">
        <ul>
          <xsl:for-each select="$items3">
            <li>
              <a href="{umbraco.library:NiceUrl(@id)}">
              <xsl:value-of select="@nodeName"/>
            </a>
            </li>
          </xsl:for-each>
        </ul>
        </xsl:if>
    <!-- end 4th level navi -->             
              
            </li>
          </xsl:for-each>
        </ul>
        </xsl:if>
    <!-- end 3rd level navi --> 

  • Zaldy Bambao 7 posts 27 karma points
    Mar 15, 2011 @ 06:25
    Zaldy Bambao
    0

    got it. the solution was:

    <xsl:value-of select="$currentPage/parent::*/@nodeName"/>
  • Zaldy Bambao 7 posts 27 karma points
    Mar 22, 2011 @ 05:59
    Zaldy Bambao
    0

    Moderator,

    how would i close this thread? it has been solved.

Please Sign in or register to post replies

Write your reply to:

Draft