As far as I can tell, theme_links doesn't fully work. Either that, or I'm assuming it can do more then it designed to do. I'm trying to do a popup navigation scheme where the top level primary_menu items are the main navigation and the children of those items are the submenus.
primary_menu button 1
-chlld button 1
-child button 2
primary_menu button 2
-chlld button 1
-child button 2
But invoking 'print theme('links', $primary_links)' only prints out the top level items, no children. It seems to me that not being able to print out the children makes the function pretty useless, so it must be able to do it, right?
I've assigned 'primary_menu' to both primary and secondary navigation in the menu settings, but that makes no difference. The menu items are also set to "expand" as well. I can't see what I'm missing.
I've made the popups works by assigning the menu to a region, printing out the region and jumping through some CSS hoops. But the theme function would be a much cleaner approach. If it worked.
I've seen a bunch of hacks around this problem, but I reticent to resort to a hack for what should be such a basic function.
Does anyone have any ideas.
Comments
We are experiencing the same
We are experiencing the same issues with the primary links.
I've had a bit of weird
I've had a bit of weird performance with it a few days ago, too.
I did this: move the primary_links (in my case it was secondary_links) into a block and remove the
print $primary_links;code from your template. This will output the links with children.Then, in your template.php, you can alter each link:
In the above example I'm adding some
<span>tags to the top-level links in the 'secondary-links' menu, as required for the design (sliding doors).---
Yuriy Babenko
www.yubastudios.com
My Drupal tutorials: http://yubastudios.com/blog/tag/tutorials
---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com
I had the same.. Just clear
I had the same..
Just clear your cache (/admin/settings/performance).