Skip to content

Instantly share code, notes, and snippets.

@ashnur
Created November 14, 2012 13:07
Show Gist options
  • Select an option

  • Save ashnur/4071994 to your computer and use it in GitHub Desktop.

Select an option

Save ashnur/4071994 to your computer and use it in GitHub Desktop.
drupal 7 issue
function ldc2_menu_link(array $variables){
$element = $variables['element'];
$sub_menu = '';
$element['#attributes']['class'][] = 'level-' . $element['#original_link']['depth'];
if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}
$output = l($element['#title'], $element['#href'], $element['#localized_options']);
return '<li rel="zzz" ' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment