Created
January 16, 2012 16:30
-
-
Save sanguis/1621647 to your computer and use it in GitHub Desktop.
drupal 7 menu link with unquid #id funnction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function theme_menu_link($variables) { | |
$element = $variables['element']; | |
//changes | |
$element['#attributes']['id'] = 'mlink-' . $element['#original_link']['mlid']; | |
// standard output; | |
$sub_menu = ''; | |
if ($element['#below']) { | |
$sub_menu = drupal_render($element['#below']); | |
} | |
$output = l($element['#title'], $element['#href'], $element['#localized_options']); | |
return '<li' . 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