Copied to clipboard

Flag this post as spam?

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


  • Adi 79 posts 183 karma points
    Jan 06, 2014 @ 10:09
    Adi
    0

    How to turn-off showing child items for selected Main Menu items?

    Hello,

    In order to explain my issue easier, please first see this photo

    enter image description here

    On my template I have already cofigured Top navigation but problem is that I am trying to make new menu Item which will be called 'News' and thing is that I don't want that every out of 99 news items I will publish (in next two months), to be autmatically available as sumbenu child item under 'News'.

    As I noticed, most of the configuration is under 'umbTopNavigation.xslt'

    ]>
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">

    <xsl:output method="xml" omit-xml-declaration="yes" />
    
    <xsl:param name="currentPage"/>
    
    <!-- Input the documenttype you want here -->
    <xsl:variable name="level" select="1"/>
    
    <xsl:template match="/">
    
        <ul id="topNavigation">
       <li class="home">
         <xsl:if test="$currentPage/@id = $currentPage/ancestor-or-self::* [@level=$level]/@id">
             <xsl:attribute name="class">home current</xsl:attribute>
         </xsl:if>
         <a href="/">Home</a>
       </li>
      <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">   <li>
     <xsl:if test="@id = $currentPage/@id">
        <xsl:attribute name="class">current</xsl:attribute>
      </xsl:if>
    <a class="navigation" href="{umbraco.library:NiceUrl(@id)}">
      <span><xsl:value-of select="@nodeName"/></span>
    </a>   </li>
      </xsl:for-each> </ul>
    
    </xsl:template>
    

    but I can't figure out what exactly I need to change?

    Any help is appreciated and many thanks in advance! Adi

Please Sign in or register to post replies

Write your reply to:

Draft