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 4020 posts 15802 karma points MVP 13x admin c-trib
    Nov 18, 2010 @ 10:31
    Lee Kelleher
    0
Please Sign in or register to post replies

Write your reply to:

Draft