I have the following navigation, displayed in page.tpl.php
:
theme('links', array('links' => menu_navigation_links('menu-site-navigation')));
There are four navigation elements that show up. I would like to display the description that goes along with these elements as well, how do I go about that?
In my template.php
file I have the following code, but I can't figure out how to only apply this change to menu-site-navigation
function MYTHEME_link($variables) {
// if there is a description for the menu item, show it
if(!empty($variables['options']['attributes']['title'])){
return '<a href="' .
check_plain(url($variables['path'], $variables['options'])) .
'"' . drupal_attributes($variables['options']['attributes']) . '>' .
($variables['options']['html'] ? $variables['text'] : check_plain($variables['text'])) .
'</a><div class="description_nav">' . $variables['options']['attributes']['title'].'</div>';
}
else{
return '<a href="' .
check_plain(url($variables['path'], $variables['options'])) . '"' .
drupal_attributes($variables['options']['attributes']) . '>' .
($variables['options']['html'] ? $variables['text'] : check_plain($variables['text'])) .
'</a>';
}
}