When I implement bartik_links__system_main_menu($variables) in my template.php file, there is nothing different in the main menu than the previous one. I've changed some of the markup in this function; I checked it in the theme developer, and the function that is responsible for the main menu is still theme_links() rather than bartik_links__system_main_menu($variables).


  • 3
    I'm assuming that you are actually using the Bartik theme, correct?
    – Chapabu
    Apr 26, 2012 at 15:38
  • yes,i am using bartik
    – user7031
    Apr 26, 2012 at 23:09

1 Answer 1


Make sure that:

  1. theme('links__system_main_menu', ... is actually used to output the menu.
  2. There are no issues with your code.
  3. Caches have been cleared after adding the function (admin/config/development/performance).

To better understand what system_main_menu is all about check keithm's answer here. The main part of the explanation is this:

links__system_main_menu is a theme hook pattern of the form [base hook]__[context]. When links are themed with theme('links__system_main_menu', $vars), theme() will search for and use theme_links__system_main_menu() if it has been defined. If not, it will use theme_links().

Official documentation about it can be found here.

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.