Copied to clipboard

Flag this post as spam?

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


  • AntiqueHair 2 posts 22 karma points
    Dec 22, 2011 @ 19:28
    AntiqueHair
    0

    Left navigation umbraco 4.7 - cws starter kit installed. COG navigation and others not working

    Anyone got any idea where I can get an expandable menu (ie. click on link and it shows sub pages)

     

    I tried Cogworks and ultimate navigation but neither work (dont display any links at all)

     

    Node structure ok, anyone please help me with this? Im new to umbraco

     

    Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 23, 2011 @ 09:49
    Jan Skovgaard
    0

    Hi AntigueHair and welcome to our :)

    When you install the two mentioned packages what are you doing afterwards? Have you inserted the navigation macroes in the template? Please describe your process in a bit more detail - and do you know if you're using the new or the old XML schema? (By default the new schema is in use on v4.7 unless it's been changed to run the legacy schema for some reason).

    /Jan

  • AntiqueHair 2 posts 22 karma points
    Dec 23, 2011 @ 10:21
    AntiqueHair
    0

    Hi and thanks for replying :)

    I downloaded 4.7.1 and installed on windows 2008 server.

    During the install process I couldnt find the Creative Website Starter kit so I installed it from Umbraco Admin 'packages install.'

    Ive done nothing other than add content to the default template.

    The XSLT for the navigation is  below but I want it to show child pages when clicked on.

    I looked around on t'interweb (northern england speak for the internet - lol) for something others had allready done and found these two pages but installing either oif these packages doesnt work.

    http://our.umbraco.org/projects/website-utilities/cogworks-flexible-navigation

    http://www.netaddicts.be/articles/the-'ultimate-navigation'.aspx

    All im doing with any of these macros is going into the master page and inserting them where i want the side navigation to be

    Anyway the current default installed nav.xslt file that came with the cws is as below. this works but doesnt show childpages.

    <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"
      exclude-result-prefixes="msxml umbraco.library">
     
      <xsl:output method="xml" omit-xml-declaration="yes"/>
      <xsl:param name="currentPage"/>
     
      <xsl:template match="/">
     
        <!-- Root Node -->
        <xsl:variable name="rootNode" select="$currentPage/ancestor-or-self::root" />

        <!-- Homepage -->
        <xsl:variable name="homeNode" select="$rootNode/CWS_Home [@isDoc]" />
       
        <ul id="navi">
          <li>
            <!--
            Add the class selected if the root node ID matches our
            current node ID in the for each loop
            -->
            <xsl:if test="$homeNode/@id = $currentPage/@id">
              <xsl:attribute name="class">
                <xsl:text>selected</xsl:text>
              </xsl:attribute>
            </xsl:if>
           
            <a href="{umbraco.library:NiceUrl($homeNode/@id)}">
              <xsl:value-of select="$homeNode/@nodeName" />
            </a>
          </li>
         
          <xsl:for-each select="$homeNode/* [@isDoc and @level = 2 and string(umbracoNaviHide) != '1']">
            <li>
              <!--
              Add the class selected if the currentpage or parent nodes (up the tree to the root)
              ID matches our current node ID in the for each loop
              -->
              <xsl:if test="$currentPage/ancestor-or-self::* [@isDoc]/@id = current()/@id">
                <xsl:attribute name="class">
                  <xsl:text>selected</xsl:text>
                </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>

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 23, 2011 @ 20:51
    Jan Skovgaard
    0

    Ok, not sure why the packages are not working for you.

    However I think the XSLT you're looking for is like the one Lee Kelleher has provided in his post (second answer) here: http://our.umbraco.org/forum/developers/api-questions/27059-Why-do-all-the-Umbraco-sites-I-see-only-have-one-top-level-%28menu%29-node?p=0#comment101189

    Hope this helps you :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft