Hi there!
I am a noob learning how to create themes, and I have now been searching a lot to figure out how to create a collapsable / expandable menu, and how to style it to my liking.

So I found out I could use menu_tree and override theme_menu_item in my template.php in order to be able to create custom styles for my menu items.
So i created secondary-links as I wanted them and in my page.tpl.php i put

 print menu_tree($secondary_links = 'secondary-links'); 

It worked beautifully as long as I was logged in as an authenticated user, but It did not show for anonymous users. So I thought: AHA! I probably need to add secondary links as a block, and tell the block that anyone can see it.

That worked, but then I got my styled menu, but ALSO the menu once again unstyled.

Does anyone have an idea what I have done wrong ?

Greatful for any help!

Comments

minimalismore’s picture

I forgot to mention that if I uncomment the

print menu_tree($secondary_links = 'secondary-links'); 

I get only the unstyled menu showing.
So it seems to me that my problem actually is that my mytheme_menu_item is not triggered when enabling the menu block, only when i call menu_tree in my page.tpl.php. So how do I actually tell drupal to show the result of my menu_tree call in page.tpl.php to all user-roles ?