By FallinHigh on
Hello!
I have the Section module installed so that i can make different tpl-files for each section on my page.
The problem I have is the following: Every section has it's own menu.
That means Section a displays menu A with the menu-points 1, 2, 3 and 4; Section b has menu B with 5, 6, 7 and so on..
Now I found a snippet which can display primary and secondary links:
print theme('links', $primary_links);
Is it now possible to print my own menu with the same method?
Thanks in advance!
FallinHigh
Comments
USE THIS METHOD
menu_primary_links() returns all the primary links try this..
make it simple will make your life easy........
Ram
<?php$links1 =
and you can find out the menu id by going into Menu Editor in the Admin and Hover over "edit" and its the number at the end :) ie if it were 4:
thanks a lot to balmung! i
thanks a lot to balmung!
i have the path module activated so that there is no id but the given name behind the edit button...
is there also a solution where i can use this name instead the id?
if i try several possible menu-id's (1 - 10) i only get the number i use as output.. :(
Yeah, I have this same
Yeah, I have this same problem. This worked fine in Drupal 5 but there is no ID anywhere in DRupal 6.
You guys can try this
You guys can try this code:
print theme('links', menu_navigation_links('menu-footer-links',0));Note:
menu-footer-links is the ID name of the custom menu on Drupal 6.
http://www.geektips.net
Thank you Tom!
This method worked for me :D
Didn't work for me
I added:
to my page.tpl.php file where 'editing-menu' is the machine readable name given to the menu. I have two menu items associated with the menu. I don't get anything except the test text. Any suggestions on how to get a custom menu to appear? I"m using Drupal v6.15
Thank you,
Scott
Scott, you need to put menu-
Scott, you need to put
menu-in front ofediting-menuso that the whole line reads:print theme('links', menu_navigation_links('menu-editing-menu',0));Marcus
AAARRRGGG! So close, yet so far...
That worked!
Thank you Marcus.
Scott
you can skip the ID
you can skip the ID altogether:
print theme('links', menu_navigation_links('menu-custom-name'));works just as goodwhere *custom-name* is the machine-readable name of the menu so you need to remember that after you create it.
none of these work for me
I am using D6.20 and I cannot see anything with any of the above instructions. The custom menu has the name accountmenu and I typed menu-accountmenu. What could be tripping me up?
What worked for me is this.
What worked for me is this. Thanks Agaric.
Yep!
@diwwin Thanks! Worked for me, too.
I'm using 6.20, and it seems that "diwwin's" comment (and URL he posted), seemed to do the trick for me. And it seems like the 'cleanest' approach as well, so just like $secondary_links and $primary_links, you can print out your $custom_menu.
Tutorial
Hi all,
i've put together a tutorial on custom menus. I hope it helps a few people.
http://www.kleinermann.com.au/blog/add-a-custom-menu-in-drupal-6/
kleinermann web design