How to move "navigation" (menu) into "header" in zen theme? Can't figure it out.....

Comments

jimmyg164’s picture

I Am looking at the same problem

dercheffe’s picture

Are there any solutions found by anyone, since last post of this thread? I have the same problem and tried to modify the page.tpl.php (not the original file of course).
Even moving the div-container "navigation" from the "main-wrapper"-div directly under the "header"-div brought not the whished effect.

mndonx’s picture

Hi there,

Are you unable to change the region of the Navigation menu on the Blocks administration page? All menus are available as blocks and can be shuffled around on that page. The path to that page is admin/structure/block.

Let me know if that works for you.

snevins’s picture

I realize this is almost a year after the original post, but I put it here in case anyone searched for it as I did.

You will need to edit two files: either layout-liquid.css or layout-fixed.css and page.tpl.php. Mind you, first you need to copy Zen's page.tpl.php to your subtheme's template's folder FIRST, and edit that one, not the one in Zen/templates.

I'm using the layout-fixed.css, and didn't look at the layout-liquid.css, so the below instructions may need to be modified for the liquid layout. Also, before I started modifying code I enabled wire frames in the theme so I could see the effects of my changes. Very helpful.

In the layout-blah.css, search for "#navigation"
I had a logo in my header, and I wanted my nav/primary links to appear to the right of the logo with the bottom of the logo lining up with the bottom of the primary links. So I had to shorten the width of my navigation area to accommodate for the logo. For me, I changed the width from 100% to 83.3% and the margin-right from 100% to -83.3%. Just for some context, my logo is 150 px wide and the width of the site is the zen default of 960, so 83.3% puts the area for nav to be about 800 px.

Then below the #navigation { blah} is a block of .with-navigation {} stuff. Comment or delete out this.

In the page.tpl.php file, search for with-navigation and delete if ($primary_links || $navigation) { print ' with-navigation'; } on approximately line 161. This isn't the entire line. The entire line is

if ($primary_links || $navigation) { print ' with-navigation'; } ">

Then search for
if ($primary_links || $navigation):

Cut everything from: if ($primary_links || $navigation):
to:

endif;
and paste it (around line 156) right before the line: print $header;

Test it out and see if you need to do any adjusting to the width and right margin in layout-blah.css

ed phillis’s picture

i.e

if ($page['navigation'] || $main_menu):