Is there another way the primary navigation is supposed to printed out besides how it is done in the core system template?

print theme('links__system_main_menu', array('links' => $main_menu));` 

None of the changes I made via the theme_menu_link() function are recognized when the links are printed this way. Are they only seen if I manually put the primary links block into a region?

Which is the function that I could use to override the primary links when printed out this way? Everything I have with theme_menu_link() does nothing.

1 Answer 1


That syntax (two underscores) means that it first looks for a theme_links__system_main_menu()theme function and then falls back to theme_links() if that doesn't exist.

So to override only the main menu, create the following theme function for your theme: yourtheme_links__system_main_menu().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.