How to set 'active' class to children of parent links?

CreativeLinks's picture
CreativeLinks
Fri, 01/10/2014 - 15:55
#1
How to set 'active' class to children of parent links?

Great module. Seriously, very impressive.

However, since MD Mega Menu does not seem to hook into the Drupal Menu system, I am not sure how to make the main nav links active when visiting a child page?

Usually, I do this through context by setting the path, and then the menu. But since MD Mega Menu doesn't appear in context, I am stumped.

So lets say I have 3 links

Home
goes to Home (shows Active when visiting)

Books
goes to Home Books Page that shows a list of books a user can click on (shows active when visiting)
User clicks on a book, and goes to Detail Book Page (nothing active) <-- How would I tell drupal or MD Mega that when a user is viewing this content type (books) that the Books link in the Mega Menu should be active?

Thanks for any help.

cindy's picture
cindy
Tue, 01/14/2014 - 22:43

Hi,
Sorry for delaying in reply.
Regarding your question, Megamenu currently does not support Context Module. In addition, the link is only active if it is in the Menu. Thus, please wait for the update version.
Regards,

CreativeLinks's picture
CreativeLinks
Thu, 02/20/2014 - 19:28

This seems to be a very standard answer. Please 'wait for an updated version'. Is there a road map?

lambers's picture
lambers
Tue, 11/01/2016 - 20:27

I just installed the new 7x-1.9 version.  Unfortunately this one has also problem that children are not becoming active.

For example I have menu structure:  computer - minipc - type1.

Clicking on computer makes it active.  But if you choose minipc from submenu, then parent " computer"  is not active any longer. So problem is that customer cannot see what menu he is in.

On old version it was possible to add css :  .md-style1 .mm-active>a:link    but in new version it is not working any longer.  Please help!

cindy's picture
cindy
Wed, 11/02/2016 - 22:49

Hi both, 

Please check your email for fixed version

Note: After update, remember to clear cache

If your problem is not solved after updating new version, please send us your site url, admin account and FTP account so that we could check the issue

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.