hi

i want to add additional sidebar to my zen based fixed 3 columns theme as an additional left sidebar

i added it to the theme info and print it in the page.tpl.php file but i didn't know how to configure it's css to make it look correct

my theme contains 4 columns like this

left sidebar 1 : 130px
left sidebar 2 : 240px
content : 490px
right sidebar : 130px

so the total width will be 990px

how can i do that ?

Comments

shruti.sheth’s picture

To add an additional sidebar to custom zen

1. Add the following code in your page.tpl.php between the sidebar_first and sidebar_second

<?php print $sidebar_left; ?>

2. Add the region as follows in your .info file

regions[sidebar_left]  = Left sidebar

3. Add the following code for css in your custom .css file

#main .region-sidebar-left {
  border: 1px solid red;
  float: left;
  margin-left: -65px;
  margin-top: 31px;
  width: 130px;
}

#main .region-sidebar-first {
  margin-left: 130px;
  width: 130px;
}

#main .region-sidebar-first .block-region {
  width: 240px;
}

#main .region-sidebar-second {
  float: left;
  margin-left: 730px;
  width: 130px;
}


#content div.section {
  margin-left: 185px;
  width: 490px;
}
mbasfour’s picture

i tried this steps but it disable the hiding region when it's empty feature from the theme and i want this feature to stay active .

shruti.sheth’s picture

Hello,

Can you please explain the problem in detail, like
1. What output is expected.
2. What output you actually get. (With the help of screenshots if possible.)
3.List the steps you perform before coming across this error.

Thanks,
Shruti

mbasfour’s picture

i followed the steps in your first comment but it makes the content region have fixed width even when there is no content in the

sidebars i want to hide the sidebars when there is no content in them

mbasfour’s picture

Status: Active » Fixed

hi

i fixed this problem with some php coding in the theme page_preprocess function

Status: Fixed » Closed (fixed)

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