#1273 ✓resolved

Limiting menu dropdown levels

Reported by Peter | February 26th, 2015 @ 10:05 AM | in 2.3.3 (closed)

The site uses a top menu with drop-downs. In the hierarchy I have a top level under which is a single further level. This all works fine. I have also created a lot of stand-alone pages that are linked from some of the second level pages. This also works fine, except that the breadcrumbs now only show the standalone page, not the path via which it was accessed. This I expect is how it is meant to be.

What I would like to do is to pull these standalone pages into the hierarchy as a third level, but NOT include them in the menu drop-downs. So the menu would have, say, top level "Top Page" with "Sub-page 1", "Sub-page2" etc. Sub-page2 might then have "Sub-sub-page1" etc but this should only be accessible from within the page, not from the menu.

I thought there was a configuration somewhere to limit how many levels of menu you display, but I can't find it. If I click on the theme management 'Configure' for the current theme there are no options at all, nor are there any under 'Simple Theme' which is where I started from. Can't find anything in the documentation or forums, please can you help? Screen shot shows Mnutst which I don't want to appear in the menu.


Comments and changes to this ticket

  • dleffler

    dleffler February 26th, 2015 @ 01:34 PM

    • Tag set to navigation
    • Assigned user cleared.
    • Milestone set to User issues

    By definition, a 'standalone' page is one which will NOT appear in a menu. If I understand you correctly, you want the parent (level 1) and child (level 2) pages to appear in the drop-down (site) menu, but any grandchild (level 3) or deeper (level 4+) pages to NOT appear in the site menu, only in other navigation views. Is that correct?

    You appear to be using a variation of the 'Mega' menu view. Therefore, you need to set the view configuration settings for the module. Select the red 'Navigation (Global)' menu item above that menu and configure settings. In the 'Display Configuration Settings' area, set the 'Maximum Menu Depth' to 2. This will prevent the display of the level 3+ pages within that menu.

    HOWEVER, you'll probably want to change the style for the pages with children so they don't appear with the white background. There are two ways to do this:

    • create a new style for '.column .greybox' to replace the mega menu style
    • edit a line in a custom navigation showall_mega.tpl file and change the line ~line 72
      {if !$depth}<div class="col_1{if !empty($child->itemdata)} column greybox{/if}">{/if}


     {if !$depth}<div class="col_1">{/if}
  • Peter

    Peter February 26th, 2015 @ 01:49 PM

    • Assigned user set to “expNinja”

    Many thanks. I knew I'd seen a way to change the menu depth way back, but forgot and couldn't find in the docs - probably there but using the wrong search... Yes your assumption was correct, and I have now change that and created a customer showall_mega.tpl file as suggested. All I have to do now is to stop the child menu with grandchildren from displaying in a larger font.

  • dleffler

    dleffler February 26th, 2015 @ 02:20 PM

    • Assigned user cleared.

    Ok, an even better fix...editing the custom view (this will be the code used in the next release)...same line ~72 and the next (only the first part displayed below)...Change

      {if !$depth}<div class="col_1{if !empty($child->itemdata)} column greybox{/if}">{/if}
        <div class="menuitem{if $config.usedesc && !empty($description)} desc{/if}{if !empty($child->itemdata)} menuheader{/if}"><a ...(remainder of line removed for posting)
      {if !$depth}<div class="col_1{if !empty($child->itemdata) && $depth < $maxdepth} column greybox{/if}">{/if}
        <div class="menuitem{if $config.usedesc && !empty($description)} desc{/if}{if !empty($child->itemdata) && $depth < $maxdepth} menuheader{/if}"><a ...(remainder of line removed for posting)
    Note we've added a phrase to each line
    && $depth < $maxdepth
    after the code
    {if !empty($child->itemdata)
  • Peter

    Peter February 26th, 2015 @ 02:24 PM

    • Assigned user set to “expNinja”

    Brilliant - all sorted. Thanks again!

  • dleffler

    dleffler February 26th, 2015 @ 05:12 PM

    • State changed from “new” to “resolved”
    • Assigned user changed from “expNinja” to “dleffler”
    • Milestone changed from User issues to 2.3.3

    Code change pushed earlier

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Bug Tracker for Exponent CMS

Shared Ticket Bins

People watching this ticket