With a menu setup like this:

Main Menu

  • Products
    • Toys
    • Clothes
  • Services
    • HairCut
  • Contact Us

I create a Products block and set the starting level to '2nd level' with unlimited depth so that the block looks like this:

Products

  • Toys
  • Clothes

If I set the visibility settings for that block to appear on every page, the block only shows up on pages that also have submenu blocks (/products, /products/toys, /products/clothes, /services, /services/haircut) - it will NOT show up on Contact Us.

I would like to reuse my Product block on my Contact Us page.

If I set the starting level of the block to '1st level' and set the visibility to show on all pages, the entire block chain will show up on every page including Contact Us.

Comments

Category:bug» feature

The help text specifically states "Blocks that start with the 2nd level or deeper will only be visible when the trail to the active menu item is in the block’s tree." - so this isn't really a bug.

Oops sorry! I somehow missed the very visible description. Any ideas why this is the case or if there are any possible workarounds?

I'm using the menu_position module: with this, you can set a rule that certain content types OR certain paths will display AS IF that path/page is in the active menu trail. Handy little override.

I'm thinking my issue (#1736852: 5th Level Items = No Menublock) may be the same as this. I'm using menu position as well. I tried adding a path rule (as mentioned in comment #3) but it still didin't work.

Can someone explain in plain english what: "Blocks that start with the 2nd level or deeper will only be visible when the trail to the active menu item is in the block’s tree" means? I don't follow that...

Category:feature» support

Starting to think that my issue is more complex than this initial issue. I'm now thinking that comment #3 meant "menu position fixed my problem", but I'm seeing this problem while using menu position.

The problem I'm noticing is: If a menu position parent has no children, except the menu position rule, the sidebar menu doesn't display. The parent is IN the active path (as far as I can understand), yet if it has no 'real' children, it doesn't display the menu.

Wondering if there MUST be a real menu child (besides menu position rules) for menu block to actually display a menu?

PS: I realize this isn't strcitly a menu block issue, but it's interplay between menu position and menu block...this queue seems more appropriate than the menu position queue

Cross posted a comment over on this menu_position issue.

Version:7.x-3.x-dev» 7.x-2.x-dev
Status:Active» Fixed

If the menu block is configured to just show 2nd and 3rd level links and the current page's menu item is in the 4th level of the menu, then the menu block will show the active trail through the 2nd and 3rd level links of the menu, but not the actual active menu item.

Using the same example menu block, if the current page doesn't have a menu item in the menu, then the "natural display" of that menu would be to show only its single 1st level of links. Obviously, the menu block configured to only show 2nd and 3rd level links will have NOTHING TO SHOW. That's why that menu block wouldn't appear on the page.

Menu position rules are REAL menu items; they are just cleverly hidden. When a menu position rule is activated, it's corresponding menu item becomes the active menu item for that menu. And then the normal menu_block rules apply.

Does that clear everything up?

When troubleshooting a menu_block problem, always enable a Drupal core block for that menu and see what it is doing. You should be able to look at that core block and then mentally apply the menu_block's pruning and shaping configuration to it.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.