I'm working on a site in Drupal 6, and I've created a page view as I wanted, and it displays in a table.

Unfortunately, the theme that I'm using has a sidebar Region which doesn't collapse even when it has no block in it. Due to this, I would like to take away the sidebar as I would like the table that renders my views to stretch across the content area.

Even though I've copied the theming information, I'm kind of confused of how to create a template to show the view in the page without the sidebar region.

Someone help.

Thank you

1 Answer 1


Here is a quick css trick that will hide the side bar in this page view :

1 Open firebug and inspect the body tag and find out the class with the name of your view ex :

In my case my view name is : page marque and I find in my body tag this :

<body class="not-front not-logged-in page-parmarque one-sidebar sidebar-left">

2 With firebug inspect the container of your sidebar id or class , suppose that your sidebar id = left-sidebar this piece of css code will resolve the problem :

.page-marque #left-sidebar{

this will hide the sidebar only in your page view , replace .page-marque and #left-sidebar with your values

Or there is a solution with jQuery alternative for your case : add this code to a javascript file and add it to .info file and flush caches

<script type="text/javascript">
  if(window.location.pathname == "/property-listing"){
  • I've edited the answer and this javascript snippet will do the work for you
    – sel_space
    Commented Apr 10, 2012 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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