Hi,

I would like to make my theme to be made of 3 columns in which I will be able to place blocks. But other pages like user profile or user forums require one column layout. How can I achieve that?

Comments

monteco’s picture

Hi Sebastian,
A lot of themes will hide the extra columns if there's nothing in them, or you can override the theme yourself to do it. If you set the blocks not to show up on the profile or forums pages, you should be fine.

starach’s picture

Thanks for the reply. So I would make a layout that would hide additional homepage boxes ( with for instance display:block; ) whenever current page wouldn't be /home. So how can I detect whether current page is home or not? I have noticed that there are certain class'es added to body tag. I assume that's one way but could you please tell me how they work. I just can't find any explanation for them over the internet.

Or maybe you had some other way in mind?

Thanks

Anonymous’s picture

In the configuration of the blocks, you can specify which pages you want those blocks to appear on (or which pages you don't want them to display on, depending on how you configure it). Go to the Page Visibility section at the bottom of the block configuration screen and look at how it's done.

For example, if you have blocks that you want to appear only on the front/home page, select the radio button that says "Show on only the listed pages." then enter in the Pages field.

(NOTE: Of course, there are more complex ways to do it, but this way is very simple.)

Anonymous’s picture

PS: More info on block configuration: http://drupal.org/node/21870 that might help you