Hello All,<div><br></div><div>To highlight a menu item (normal menu) as active when in certain conditions i want to add a (css) class to the link in question. I tried setting the menu item as active using menu_set_active_item, but this breaks the local tasks menu. I tried doing the same using menu_set_item preceded by menu_local_tasks(0), again this breaks the local tasks. So it seems i have to add a css class to my menu item. I tried this using the following hooks, but to no avail:</div>
<div><br></div><div><div>function my_module_menu_link_alter(&$item, $menu) {</div><div> if($item['link_path'] == 'evaluator/mijn-projecten/personal') {</div><div> $item['options']['alter'] = TRUE;</div>
<div> $item['options']['attributes']['class'] = (($item['options']['attributes']['class'])?' ':'') . "active-trail";</div><div> }</div><div>}</div>
<div><br></div><div><span class="Apple-style-span">function </span>my_module<span class="Apple-style-span">_translated_menu_link_alter(&$item, $map) {</span></div><div> $item['localized_options']['attributes']['class'] .= ' active-trail';</div>
<div>}</div></div><div><br></div><div>Any ideas?</div><div><br></div><div>Best,</div><div><br></div><div><br></div><div>Toon</div><div><br></div>