Greetings,
Many bootstrap themes call for the active class in the LI element as opposed to Drupal's default A element. I was wondering if you could enhance the radix_menu_link function to make it possible to add a class for the LI element as well? Thanks for the great theme. kevin
Comments
Comment #1
shadcn commentedThanks for this. I pushed a fix. http://drupalcode.org/project/radix.git/commit/deb4137
Comment #2
pyxio commentedHi arshadcn,
Thanks for the fast and perfect fix. menu.inc is a very clean and bootstrap friendly implementation of the Drupal menu. Users don't even have to muck around with contributed modules like superfish and nice menus. the only thing i would say that is missing yet is short title link descriptions commonly seen in bootstrap menus. I have this working but surely my code would not be as elegant as yours. If you are keen on integrating it into radix for others I currently have something to this effect...
// Add link description below link title
//if ($element['#original_link']['menu_name'] == "main-menu"){
//$element['#title'] .= ''.$element['#localized_options']['attributes']['title'].'';
//}
note, //$element['#localized_options']['html'] = TRUE; needs to be added at the top of the function to ensure the description is wrapped in span tags.
Also note, this code does throw some undefined index notices in the current state above.
Thanks for everything. Kevin
Comment #4
pyxio commentedHi,
Should this menu.inc update be adding an active class to the primary menu
but now is appearing like:
dunno if I did anything wrong or if it currently does not put an active class at the top level. let me know. Thanks!!
Comment #5
pyxio commentedi should clarify.. top level pages show the active li class just fine. but when clicking on a page in a submenu, the primary menu active class is lost.
Comment #6
pyxio commentedHi
Can you please take a look at my menu.inc file here http://pastebin.com/tuFvCQ2W. My top level active LI should have the class current-menu-parent but the class is not being added. Please let me know if there is a mistake in my menu.inc. I appreciate it thanks. Kevin
Comment #7
pyxio commentedMy apologies, this works perfectly. I forgot to update template.php diff as well. Thanks a million