I'm using a custom template and attempting to customize the output of specific menu items. However when I attempt to output each link in the menu specified it outputs nothing. menu-it is the machine name of the menu.

<?php $menu = menu_navigation_links('menu-it', 1);
    foreach($menu as $item){
        print $item;

1 Answer 1


The normal way to print that menu would be:

<?php print theme('links', array('links' => $menu), 'attributes' => array('class'=> array('links', 'site-menu')) ));?>

or similar.

If you want to do something different for individual items then in template.php you could implement:

function THEME_preprocess_menu_link(&$variables) {
    // if certain menu item, do something different

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.