Currently primary links output is being generated by direct use of theme('item_list') or theme('links') - we should have wrapper functions which do that for us.

This would also make it easier to add "Welcome, $username" in plain text to the 'user links' menu without messing about in hook_preprocess_page().

Comments

catch’s picture

sun’s picture

Title: Create theme functions for primary, secondary and user links » Create sub-theme functions for rendering menus
Priority: Normal » Critical

What we really want is support for sub-theme functions. theme() should check for theme_MENU_NAME_menu_links() in front of invoking theme_menu_links().

That way, all menus can be rendered differently and there is no special logic for some arbitrary menus.

catch’s picture

We just did this for theme_links(), any reason not to add the same here?

sun’s picture

oopsie. I forgot about this issue - there's a patch in #634472: Menus cannot be themed differently

catch’s picture

Status: Active » Closed (duplicate)