hyperlink - How to add menu link wrapper in drupal 7? -
i have menu, 1 menu item looking this:
<li> <a href="aaa">link title</a> </li>
and want this:
<li> <a href="aaa"> <div class="custom">link title</div> </a> </li>
or this:
<li> <div class="custom"> <a href="aaa">link title</a> </div> </li>
how can this?
this works:
function theme_menu_link(array $variables) { $variables['element']['#localized_options']['html'] = true; $variables['element']['#title'] = '<div class="custom">' . $variables['element']['#original_link']['link_title'] . '</div>'; return theme_menu_link($variables); }
Comments
Post a Comment