Zen 7.x-6.x Theme defaults to Two Columns. The second side bar appears under the first sidebar resulting in a two column layout.

Here is the resulting css for "First" left side bar:
@media (min-width: 999px)
.layout-3col__left-sidebar, .layout-3col__first-left-sidebar, .layout-3col__second-left-sidebar {
clear: right;
float: right;
width: 33.33333%;
margin-right: 66.66667%;
margin-left: -100%;
}

Here is the resulting css for "Second" right side bar:
@media (min-width: 999px)
.layout-3col__left-sidebar, .layout-3col__first-left-sidebar, .layout-3col__second-left-sidebar {
clear: right;
float: right;
width: 33.33333%;
margin-right: 66.66667%;
margin-left: -100%;
}

And css for content:
@media (min-width: 999px)
.layout-3col__right-content {
float: left;
width: 66.66667%;
margin-left: 33.33333%;
margin-right: -100%;
}

I cannot see how one can get a 3 column layout from the above css?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lperepol created an issue. See original summary.

vidit.anjaria’s picture

Hi @lperepol,

You are absolutely right. I think we should provide patch for this issue. But it will make too much changes in the core styles.css file.

sl27257’s picture

Is anyone working on fixing this issue?

Phoenix48’s picture

I have the same problem. After a little research, i realised that the second sidebar is not the same thing as the right sidebar. I had wrongly assumed that the second sidebar was to the right. The second sidebar is in fact the second left sidebar and the right sidebar is what it is. I found references to the right sidebar in the style.css file in the zen/zen-internals/css folder but they don't seems to be in effect and don't show up as block anywhere. I hope someone better than me at coding will find the time to fix it.

sl27257’s picture

Hi,

here is a patch that solves most of the problem. It is actually much easier then I thought...

The patch is towards the zen 7.x-6.4 as distributed, i.e. it shall be applied before the STARTERKIT is taken out and made into a sub-theme.

What is done is

  1. Copy zen/templates/page.tpl.php into your-sub-theme/templates/
  2. Change three lines in this file (You will find them with your favourite tool in the patch)
  3. Change one line in your-sub-theme/sass/layouts/layout-3col/_layout-3col.scss

The change in the _layout-3col.scss might introduce side effects in other implementations. If so a new style must be introduced for this case. Not too hard to do.

There is a "minor" problem when in tablet-mode (2-col mode) that should be looked into.

/Thomas

sl27257’s picture

BTW, don't forget to

  • Visit the admin/appearance page to rebuild the theme registry
  • Clear the cache at admin/config/development/performance

after you have applied the patch!

/Thomas

hans_dampfer’s picture

It´s a bit confusing with STARTERKIT region-namings:

sidebar_first
sidebar_second
left-sidebar
right-sidebar
first-left-sidebar
second-left-sidebar

In STARTERKIT.info.txt there are only the regions:
sidebar_first
sidebar_second

In the page.tpl.php these two regions are called:
$sidebar_first = render($page['sidebar_first']);
$sidebar_second = render($page['sidebar_second']);

In the STARTERKITs _layout-3col.scss there are the classes
&__left-sidebar
&__first-left-sidebar
&__second-left-sidebar
&__right-sidebar

So without the patch you have a second-left-sidebar.
With the patch you have a right-sidebar.

HANS

torgosPizza’s picture

Status: Active » Needs review

There's a patch here, so setting to Needs Review.

JohnAlbin’s picture

Version: 7.x-6.4 » 7.x-6.x-dev