Would it be possible to change the module so that the active-trail or active class is set for links to items which aren't nodes (e.g. links to views)?

Comments

AlexisWilke’s picture

Hi Accelebrate,

The following is a link to a view and the top menu item is shown in brown:

http://linux.m2osw.com/os_list/Linux

Do you have a problem with the item in the drop-down pane?

Thank you.
Alexis

tealium’s picture

Hi Alexis,

Thanks for responding to this so quickly.

I should have investigated this further before raising the issue. You're quite correct, if I add a menu link to a view the active trail is set as expected. The issue I seem to be having is when I pass a wildcard 'all items' argument to the view.

In the site I'm working on at the moment if I set the news link in the primary menu to be 'news' everything works as expected and the active trail is set on CuteMenu, however setting the path to be 'news/all' results in the active trail class not being applied.

Hope this narrows things down a bit!

Regards,
Ian

AlexisWilke’s picture

Accelebrate,

Ah! Yes... I had that problem with another module. I'll have to test, but I think that the menu_get_item() in the following line:

if ($item = menu_get_item()) {

fails. Or at least, does not return what we'd expect and then the path breaks.

Thank you.
Alexis