Closed (fixed)
Project:
Zen
Version:
7.x-5.x-dev
Component:
PHP/JS code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jan 2012 at 10:28 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent
Comments
Comment #1
echoz commentedFirst off, that’s not the main menu code in it’s entirety as it appears in page.tpl. Also, you could test if the $secondary_menu might work for your needs, as it is already in the header. If positioning that is an issue, you could also make a new region above header for a custom menu.
BTW, the 7.x-3.x branch is the release version. 7.x-5.x-dev is more of a moving target, and it looks like you’re already working with an older version of page.tpl (if in fact you are writing about 7.x-5).
Comment #2
johnalbinWorking with menus from within the page.tpl is a major PITA. Which is why I wrote the Menu Block module. http://drupal.org/project/menu_block
I think you'll find configuring a Menu Block and placing it in one of your sub-theme's regions much easier than trying to deal with the $main_menu variable in page.tpl. I have plans to remove those menu variables in Drupal 8.
I think we need a code comment in page.tpl to steer people clear of those variables.
Comment #3
johnalbinI added a lengthy note about this just before
print theme('links__system_main_menu'in the page.tpl.php.http://drupalcode.org/project/zen.git/commitdiff/a834407