Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Wondering how to remove the Sidebar Right region on a page that I will be using for my gallery (so I have more space for the gallery). I have cleared all the blocks, but still the region stays. I have spent hours on trying to figure this out (I'm really new and don't know any coding). I believe the correct way to do this is a condition statement that will prevent printing the sidebar if the page is the gallery. Can anyone help?
Comments
Comment #1
Deepika.chavan CreditAttribution: Deepika.chavan commentedHi,
I tried the same thing on my local site.
1. In page.tpl.php, code is there to print 'Network connect' block . So to remove the block code from page.tpl.php I replaced following code :
with the following:
2. Created new block named 'Network Connect' and added following code in block body with full html filter.
-- Now we can control the display of this block by selecting option 'All pages except those listed'.
-- Because of
<?php if($page['sidebar_first']): ?>
condition if the block is there then only it will display the 'right' region.3. Added following css code in custom css file if no block is enabled in 'Sidebar First' region.
4. Please clear cached data.
HTH !!
Rgrds,
Deepika Chavan.
Comment #2
gtsopour CreditAttribution: gtsopour commentedHello larspeterson,
Firstly, I would like to thank once again Deepika Chavan for her great support. I appreciate her effort.
Also, I would like to inform you that i have already embedded/committed the changes to the style.css and page.tpl.php files and will be included in next Bluemasters version 7.x-1.2, which is currently being prepared.
Only with a small diff in style.css
Thanks again
/George