I have this code on my page.tpl.php.

<?php if (isset($bottom_links)) : ?>
   <?php print theme('links', $bottom_links, array('class' => 'links bottom-links')) ?>
<?php endif; ?>

and I have added a menu "Bottom links".

How do I get the links added to bottom to list using the code on the page?
do I need to adds something to template.php?
i would prefer not add a block.

Comments

ryivhnn’s picture

I have a site where I cheated and hard coded links at the top of the page, but could do that coz I wasn't planning on sharing the theme (done specifically for that site, graphics done by someone else, am quite happy to help others with theme work when I have time :P). If you're not going to release it you could probably do the same thing. If you are, ignore me, I'm on a quick and dirty solution run at the moment :)

works at bekandloz | plays at technonaturalist

styro’s picture

using this technique: http://drupal.org/node/16383

In your template.php, add something like this:

<?php
function _phptemplate_variables($hook, $vars) {
   $pid = 12; // NOTE: change this number to the menu id of your new menu
   switch($hook) {
     case 'page' :
        $vars['bottom_links'] =  menu_primary_links(1, $pid);
        break;
   }
   return $vars;
}
?>

This creates a $bottom_links variable for your page.tpl.php template that contains an array of menu links that should (I haven't tested any of this) work with the code you already have there.

Remember to change the menu id in the code above.

If you already have a _phptemplate_variables() function in your template.php it gets more complicated though.

--
Anton
New to Drupal? | Troubleshooting FAQ
Example Project management software knowledge base built with Drupal

sean porter’s picture

I'd like to do this same thing in my D6 site, but I'm gathering its done a different way than in D5. Any help would be greatly appreciated!

sean porter’s picture