Copied to clipboard

Flag this post as spam?

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


  • thanhtien501 28 posts 48 karma points
    Nov 17, 2010 @ 23:26
    thanhtien501
    0

    Hide a page in navigation

    Hi All

     I created a below  tree  ( the HideInNavigation is a attribute in Document  type: boolean in generic property)


    -Home Page (HideInNavigation=false)
    ------Page News (HideInNagation=false)
    -------------20101118 (HideInNagation=true)
    -------------------news 1
    -------------------news 2
    -------------------news 3

     

    In Page News 1 I want show the navigation menu  Home Page-->PageNews -->News 1( does not have 2010118)

    to do that , i write a xslt code


    <xsl:param name="currentPage"/>
    <xsl:variable name="currentNode"
    select="$currentPage/@nodeName"/>
    <xsl:template match="/">
    <!--start
    writing XSLT -->

      <div class="nagativeURL">
      <ul>
        <xsl:for-each select="$currentPage/ancestor-or-self::*[@isDoc
    and string(
    HideInNavigation) != '1']">
                --><a href="{umbraco.library:NiceUrl(@id)}">
    <xsl:value-of select="@nodeName"/> </a>
            </xsl:for-each>
      </ul>
      </div>

    But It does not work. The navigation is still have 20101118 

    and the navigation look like below:

    -->Home Page --> Page News-->20101118--> News 1

    Thank you for your patience.

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Nov 18, 2010 @ 10:31
    Lee Kelleher
    0
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies