I have a site that has several pages that are just views (a blog page, calendar page, and similar). I want about 50% of my views to collapse the right column. Do I have to create a template for each individual view? Is there any way I can give views 1,2 & 3 a 3-column layout and give 4,5 & 6 a 2-column layout?

Idea: is it possible to add my own custom displays for views and theme those? Right now I have Page, Block, etc - could I have Page2column and Page3column? Then I could make my changes in views-view--page2column.tpl.php and views-view--page3column.tpl.php, right?

1 Answer 1


You could do this with Context. Set the Context condition to be either path or view based (depending on what suits your site structure) and then have the Context reaction take care of block placement (presuming your sidebar will collapse if empty).

  • Very cool. Love the ability to disable whole regions using the Context module - that was exactly what I was looking for. Thanks!
    – doub1ejack
    Feb 7, 2013 at 16:05
  • ..however right now it's only removing the right sidebar region if I am not logged in. Any idea why it wouldn't be removing that region for admins?
    – doub1ejack
    Feb 7, 2013 at 16:06
  • Is there a block in the sidebar that's set to only appear for certain roles?
    – danbohea
    Feb 7, 2013 at 20:52
  • Yes, I guess. We're using the omega theme & apparently when the debugging blocks are turned on in the theme settings it prevents the sidebar from disappearing. I guess I don't really understand how the theme & Context are working together here...
    – doub1ejack
    Feb 8, 2013 at 14:53
  • 1
    Yes, that's a common 'gotcha' with Omega 3. I generally leave the debugging blocks disabled so that I can be sure that regions are collapsing as intended.
    – danbohea
    Feb 8, 2013 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.