How can I modify the page.tpl.php file to allow the main menu to print even when I add a block to the header region? Currently if I add a block to the header, the menu disappears. Any help would be most appreciated. I am trying to add third navigation for about, contact etc.

I believe this is the code:

<?php
if ($page['header']) :
?>

<?php
print drupal_render($page['header']);
?>

<?php
else :
?>

<?php
print theme('links__system_main_menu', array(
               
'links' => $main_menu,
               
'attributes' => array(
                   
'id' => 'main-menu-links',
                   
'class' => array('menu', 'clearfix'),
                ),
               
'heading' => array(
                   
'text' => t('Main menu'),
                   
'level' => 'h2',
                   
'class' => array('element-invisible'),
                ),
                ));
?>

<?php
endif;
?>

Comments

Assigned:sjosh36» gtsopour

Status:Needs work» Active

Hello Josh,

there is no need to edit the code at the page.tpl.php template file. Just place the already existing Main menu block (in this way you keep the Main menu) to the Header region and any other block you want through Home » Administration » Structure » Blocks

Thanks
/George

Thanks George,

Sometimes it is the simplest of answers :). That worked as suggested, only question is, how do I now remove the "Main Menu" title?

Thanks,
Josh

never-mind worked.

Hello Josh,

just edit the Main menu block through Home » Administration » Structure » Blocks and set its title .

Thanks
/George

Status:Active» Fixed

ok Josh,
I am glad to hear that you have resolved your issues.

Thanks
/George

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.