2

How do I change the active menu item when showing a view? This post shows me how to do it for node (using hook_nodeapi()), but how/when/where do I do it for a view? I tried hook_views_pre_view(), but that does not work.

2
  • If a view is associated with a menu item, isn't that menu item active when the view is being shown? – apaderno Jun 3 '11 at 15:44
  • The final goal for me is to activate the last menu item (referrer) again, so that the menue stays the same depending from where you came. Thats what I ment with dynamic. – nonsenz Jun 4 '11 at 7:44
1

You could use Context and set condition to be your view and reaction to be menu link.

0

One thing you could try is to use the Menu position module, it lets you make rules for when and what menu item is selected. Also Menu trails is something you could check out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.