Copied to clipboard

Flag this post as spam?

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


  • James 3 posts 23 karma points
    Nov 15, 2010 @ 13:34
    James
    0

    Content structure - nav menu

    Hi there,

     

    I've been trying to get a simple navigation menu to work. I've tried the RunwayDropdownNavigation module as well as trying to make my own and every time I have the same problem. For simplicity, I'll use Runway as a base for discussion:

     

    The RunwayDropdownNavigation module does work in so far as it displays the structure of the nodes, BUT only 2nd level down. Put simply, it only shows nodes *underneath* the Runway Homepage folder, and not the Runway Homepage itself. On my other installation I have this content structure (under the Content tab):

     

    Homepage

        - Sub page

    About Us

    Contact

     

    Unfortunately, only "Sub page" shows up in any navigation xslt's I've tried! Has anyone else encountered this? More specifically, can anyone help?

     

    Much appreciated!

  • Rich Green 2246 posts 4008 karma points
    Nov 15, 2010 @ 13:41
    Rich Green
    0

    James,

    It sounds like your structure maybe a little off, can you post a picture of it?

    In general website structures are:

     

    Content

    - Homepage

    - Sub page

    -Sub sub page

    - About Us

    - Contact

     

    These will give you

    website.com (home)

    website.com/Sub-Page

    website.com/sub-page/sub-sub-page

    website.com/About-us

    website.com/Contact

     

    Rich

  • Mladen Macanovic 22 posts 45 karma points
    Nov 15, 2010 @ 13:43
    Mladen Macanovic
    0

    I had the same problem and I just manually added a link to the home page. This should be done after the <ul> tag and before <xsl:for-each> loop.

    Just do something like

    <a>
         <xsl:attribute name="href">                                    
             <xsl:text>~/index.aspx</xsl:text>
         </xsl:attribute>
        <h3>
              Index
        </h3>
    </a>   

    It's not very beautiful but it should do the work.

  • James 3 posts 23 karma points
    Nov 15, 2010 @ 13:51
    James
    0

    Thanks Rich and Mladen for the quick helpful responses. 

    Rich, my structure is wrong I see. I didn't realize everything should be under "Homepage", i.e. I presumed "Content" was the root node, not "Homepage". In that light it becomes clear that RunwayDropdownNavigation works as expected. However, in the structure you've given the RunwayDropdownNavigation module still won't show Homepage node; it will only show 

     Sub page

        Sub sub page

     About Us

     Contact

    in the menu. Is there no other way besides what Mladen has suggested to get the Homepage node to show in the menu?

  • Rich Green 2246 posts 4008 karma points
    Nov 15, 2010 @ 13:56
    Rich Green
    0

    James,

    Some people like to show the homepage on navigation, some don't. If you want to include it, you can use this or Mladen's code

    <li>
      <href="/">
        <xsl:if test="$currentPage/@level=1">
          <xsl:attribute name="class">active</xsl:attribute>
        </xsl:if>
        <xsl:text>Home</xsl:text>
      </a>
    </li>

    Rich

  • James 3 posts 23 karma points
    Nov 15, 2010 @ 14:03
    James
    0

    OK that makes sense. Thanks for your help, much appreciated!

Please Sign in or register to post replies

Write your reply to:

Draft