Copied to clipboard

Flag this post as spam?

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


  • Shwetha Shankar 21 posts 41 karma points
    Dec 14, 2010 @ 16:10
    Shwetha Shankar
    0

    Recently installed Umbraco - Top navigation not displayed

    Hi there,

    I have recently installed and configured Umbraco. However the top navigation menu does not display on the site. I have checked the that the Runway Top Navigation module under Developer -> Installed Packages is installed. Just to make sure I uninstalled the module and re-installed this, but to no avail.

    Can someone please help me. I am a complete newbie to Umbraco and would appreciate any help/advice. Thanks.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 14, 2010 @ 23:36
    Kim Andersen
    0

    Hi Shwetha

    Have you installed the top navigation package after you installed the runway package? In that case, you probably need to insert the top navigation macro in your master template.

    You can do this by going to the Settings section, and clicking yous Master template under the Templates-folder. When you have opened the Master tempalte, click the place in the code where you want to insert the menu and then click the "Insert macro"-button. Now you select the top navigation macro, and presses OK or whatever that button is called.

    When the macro is inserted you save the template, and then you should be good to go.

    Does this help?

    /Kim A

  • Shwetha Shankar 21 posts 41 karma points
    Dec 15, 2010 @ 10:21
    Shwetha Shankar
    0

    Thanks Kim. That worked like a charm!

  • Kim Andersen 1447 posts 2196 karma points MVP
    Dec 15, 2010 @ 19:51
    Kim Andersen
    0

    You are very welcome Shwetha. Glad you got it sorted out!

    Could you mark this issue as solved, so that anyone else going through the forum posts, can see that this is no longer an open issue?

    /Kim A

  • praveen 113 posts 164 karma points
    Jul 19, 2011 @ 03:33
    praveen
    0

    Hi There

    I have installed UMBRACO 4.7 and want to install "top navigation package" can you please provide the link to download this package please.

    Thanks

    Praveen

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 19, 2011 @ 14:35
    Kim Andersen
    0

    Hi Praveen, if you want t have a standard top navigation, you can just go to the developer section and create a new XSLT-file. Call it something like TopNavigation, and base it on the navigation template. This should do the trick, and then you've got a great working top navigation :)

    /Kim A

  • praveen 113 posts 164 karma points
    Jul 20, 2011 @ 00:03
    praveen
    0

    Hi Kim

    Umbraco version: 4.7

    As advised I created TopNavigation.xslt based on "Navigation Prototype" template and then I have inserted the macro

    <umbraco:Macro Alias="TopNavigation" runat="server"></umbraco:Macro> in my master template. But this does not work,

    am I missing something or have not installed something, like you have advised Swetha to install "top navigation package"  if I need to install something like this for 4.7 then can you please provide the link.

    Kind Regards

    Praveen

     

         

     

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 20, 2011 @ 05:48
  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 20, 2011 @ 22:05
    Kim Andersen
    0

    Praveen, could you show us the structure of your content, and also the xslt-code that's being used in the topNavigatin.xslt?

    /Kim A

  • praveen 113 posts 164 karma points
    Jul 20, 2011 @ 23:33
    praveen
    0

    Hi Kim

    Umbraco version 4.7

    From the website the menu looks like this

    Home | Resources | Other Links | NZ FGM Programme | Contact

    Screen shot for the content tab

    XSLT CODE

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">

    <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="/">
    <!-- The fun starts here -->
    <ul>
     <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> 
      <li>   
           <xsl:if test="$currentPage/ancestor-or-self::*/@id = current()/@id">     
           <!-- we're under the item - you can do your own styling here -->    
           <xsl:attribute name="class">active</xsl:attribute>     
                      </xsl:if>          
                       <xsl:if test="position()=last()">      
                       <!-- we're under the item - you can do your own styling here -->        
                       <xsl:attribute name="class">last</xsl:attribute>      
                       </xsl:if>   
                       <a href="{umbraco.library:NiceUrl(@id)}">  <xsl:value-of select="@nodeName"/>    </a>     
      </li>
     </xsl:for-each>
    </ul>

    </xsl:template>

    </xsl:stylesheet>

    Please help

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 21, 2011 @ 12:02
    Kim Andersen
    0

    The reason why you are not getting anything displayed is that your structure is different from the "normal" way of structuring the nodes in Umbraco.Usually the structure looks somehting like this:

    -Content

    --Home

    ---Resources

    ---FAQ

    etc.

    If your're ging for your structure try changing the code to this:

    <xsl:variable name="root" select="$currentPage/ancestor-or-self::root" />
    <xsl:template match="/">
    <!-- The fun starts here -->
    <ul>
     <xsl:for-each select="$root/* [@isDoc and string(umbracoNaviHide) != '1']"> 
      <li>   
           <xsl:if test="$currentPage/ancestor-or-self::*/@id = current()/@id">     
           <!-- we're under the item - you can do your own styling here -->    
           <xsl:attribute name="class">active</xsl:attribute>     
                      </xsl:if>          
                       <xsl:if test="position()=last()">      
                       <!-- we're under the item - you can do your own styling here -->        
                       <xsl:attribute name="class">last</xsl:attribute>      
                       </xsl:if>   
                       <a href="{umbraco.library:NiceUrl(@id)}">  <xsl:value-of select="@nodeName"/>    </a>     
      </li>
     </xsl:for-each>
    </ul>
    </xsl:template>

    Does that make a difference?

    /Kim A

  • praveen 113 posts 164 karma points
    Jul 22, 2011 @ 00:09
    praveen
    0

    Hey Kim COOL AS it worked like a charm

    many thanks for your help mate, what is your email id please let me know

    Praveen

    [email protected]

  • praveen 113 posts 164 karma points
    Jul 22, 2011 @ 01:36
    praveen
    0

    Hi Kim

    Can you please help with this thread if you have time please

    http://our.umbraco.org/forum/developers/api-questions/22457-Umbraco-47-sitemap-not-working

    Kind Regards

    Praveen

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jul 22, 2011 @ 10:03
    Kim Andersen
    0

    Hi Praveen

    Great to hear that it worked. It looks like Dirk has already answered you in that post. But I'll keep an eye out for that post, if there's further questions, or it still doesn't work :)

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft