Skip to content

Instantly share code, notes, and snippets.

View henrijs's full-sized avatar

Henrijs Šešo henrijs

  • Wunder
  • Riga, Latvia
View GitHub Profile
function themename_menu_link(&$variables) {
$element = $variables['element'];
$sub_menu = '';
$element['#attributes']['data-menu-parent'] = $element['#original_link']['menu_name'] . '-' . $element['#original_link']['depth'];
if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}