Greetings

Menu block module works fine for displaying block depending upon the active menu.
My menu structure is like this...

_Item1 callback url : item1
_ _ Item1.1 callback url : item1/item1.1
_ _ item1.2 callback url : item1/item1.2
_Item2 callback url : item2
_ _Item2.1 callback url : item2/item2.1
_ _item2.2 callback url : item2/item2.2

when i click on item2.2 it displays some nodes in teaser view and nodes on this page take me to url given below
item2/item2.2/node2.2.1
item2/item2.2/node2.2.2

But On any node page Menu block disappears , of course it will , because the node url is not part of the menu.
Now I want this module to work in a way if any url is not in the menu( but exists) should serach for the menu item by removing last argument untill it matches the existing menu url so that menu_block is always visible.

For callback url item2/item2.2/node2.2.1 which does not exist in the menu, it should search for item2/item2.2 and then should display the block according to item2/item2.2

Kindly help me how this can be achieved.

Thanks in advance

Comments

FiNeX’s picture

It looks that many people have this problem, but nobody seems able to solve it :-(

gianfrasoft’s picture

Hi drupalhooked, did you solve the problem? If yes, how?

hefox’s picture

I believe menu blocks will show up if it believes it's part of the active trail, like if menu trails activates them.

Ie said you have an events menu item, and you say content type events shows up under menu item events (in menu trails), it'll think menu item is in the menu trail, and so the menu block should show up.

JohnAlbin’s picture

Category: feature » support
Status: Active » Fixed

Yeah, that's the classic problem with Drupal's menu system. You have a teaser list of nodes in the menu system, but none of the actual nodes are in the menu.

As hefox mentioned there are other modules that can help with this issue.

In addition, menu_block 6.x-2.3 (or the -dev) has a HOOK_menu_block_tree_alter() to allow direct tree manipulation. So you could add in the active trail based on your own business logic.

Status: Fixed » Closed (fixed)

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

Bartezz’s picture

Version: 6.x-2.2 » 6.x-2.3
Status: Closed (fixed) » Active

Hi,

Am not starting a new issue as I believe my issue is exactly the same. I'm using menu_trails to assign news nodes to the news menu item which is part of seconday menu. The news menu item itself links to a view. The breadcrumbs are set correctly by menu_trails menu. Yet the menu block isn't shown on news nodes. When looking at the source code the news menu item in the secondary menu is getting the active-trail class.

Do I need to configure something differently?

Cheers

JohnAlbin’s picture

Status: Active » Fixed

Since I originally commented on this issue, I have written the Menu Position module which should fix this problem. http://drupal.org/project/menu_position

Status: Fixed » Closed (fixed)

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