By deathgod on
Like the title says, what code do I use to call a menu that I have created in Admin>Site Building>Menus into my theme .tpl.php.
Thanks.
Like the title says, what code do I use to call a menu that I have created in Admin>Site Building>Menus into my theme .tpl.php.
Thanks.
Comments
What do you mean "call a
What do you mean "call a menu"? Can you explain what that should do?
The "easy" way is to add the
The "easy" way is to add the block holding the menu to a region.
try using $secondary_links
try using $secondary_links and $_primary_links
loop through these arrays and work on it.
sharma chelluri
By calling a menu, I mean
By calling a menu, I mean just placing a custom menu/block anywhere when I stick some kind of placeholder code. The header/footer/sidebars are a bit too restrictive and I'd like to position my menu in an exact spot. Also could you elaborate a little sharma, I'm a little new to this and a little lost :P
The best practice way
The best practice way (seeing as you are modifying your page.tpl.php anyway) is to declare a new region where you want it, then place the menu block in that region. Good fun.
Beyond that, if you understand the implications of doing unsupported code, you can invoke
where '7' is the menu ID you want. Or something like that.
http://api.drupal.org/api/function/menu_tree/6
.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |
.dan. is the New Zealand Drupal Developer working on Government Web Standards
Okie thx dman, I'll go with
Okie thx dman, I'll go with the declaring the region way of things.
Thanks to all for the help.
Notice that those
Notice that those instructions for regions are only for Drupal 6. There is a note about Drupal 5, and you will have to look up the documentation for that.