Collapsible Columns - Solution


Author Message
GSP

Posted: 3/30/2009
Quote message 

This was a big problem for us when using Artisteer to create professional Drupal sites.

It was also a surprisingly easy fix which should really be part of the Artisteer output by default.

In your page.tpl.php file and any children (ie. page-blog.tpl.php, page-node.tpl.php, etc) change the <body> line to:

<body class="<?php echo $body_classes ?>">


This string contains a number of attributes which are applied to the <body> tag, including how many sidebar columns are displayed. We can then add the following lines to our CSS file to change the width of the content column based on the number of sidebars which need to be displayed:

/* Collapsible columns for a 900px wide sheet */  


.one-sidebar .contentLayout .content {
width: 676px; /* screen - sidebar width from sidebar1 definition */
}

.no-sidebars .contentLayout .content {
width: 900px; /* set content column to full width of screen region */
}

/* end collapsible columns */

 
Patrick Visser

Posted: 3/31/2009
Quote message 

Nice Mod. That did the job my friend Thanks:-)
 
MAV

Posted: 3/31/2009
Quote message 

Hi GSP,

Where do I put the code for the css? I put into the body part and it didn't seem to work.

Thanks

M
 
Patrick Visser

Posted: 4/1/2009
Quote message 

Hi Mav,

You just insert it in the style.css where you want. If you use Subtheme, like I do. Insert it in the subthemename.css just under the

@import part

Hope this helps..
 
MAV

Posted: 4/1/2009
Quote message 

:-D
Gentleman Thank You! It works but only for Drupal 6.

M
 
Chad Dupuis

Posted: 4/1/2009
Quote message 

If you are having trouble, these instructions will only work in drupal 6. In 5 you need to change $body_classes to $layout which will give you .left .right and change the css accordingly.


 
Peter Roden

Posted: 4/8/2009
Quote message 

The title looks promising. I am having problems with collapsing blocks on my Drupal site. Does your 'collapsible columns' refer to blocks. if not what do you mean by the term 'collapsible columns'?

This is turning into a really great product, and saves bucket loads of time. So long as i can find workarounds for the known bugs I am happy.

many thanks

Peter
 
Pip

Posted: 1/5/2012
Quote message 

Sorry i am a newbe, just wondering how to use this solution?
When i put it in the style sheet it does not display properly.
I am wondering if there is something in my theme that overides this?

pip
http://www.incomeprotectioninsurancequote.net.au/