Hi,

I want to add another region in the footer (so that there are four regions there total, side-by-side) and possibly two regions in the content, similar to how the BlueMasters theme has the three regions under the main content. I'm kind of new to Drupal so I'm not really sure how to go about doing this.

Thanks!

Comments

gtsopour’s picture

Assigned: Unassigned » gtsopour
Category: feature » support
Issue tags: +Corporate Theme, +Corporate Clean Theme, +CorporateClean, +Adding new regions, +Drupal regions
gtsopour’s picture

Version: 7.x-1.3 » 7.x-1.4
gtsopour’s picture

Title: Adding new regions (detailed instructions) » Adding a Region

Hello naila_z,

I'll explain you in detail the addition of the extra regions reported. You should edit the corporateclean.info and page.tpl.php files and finally place the new css rules into a new local.css file where custom CSS rules and modifications could be placed. Following this practise, there is no worry if the next theme update will override all your custom css changes.

naila_z, just follow the steps bellow - personally I followed these steps in order to record them :)

1. Edit the corporateclean.info file (sites/all/themes/corporateclean/corporateclean.info)
At this step, you should define your new regions (Content bottom left, Content bottom right and Footer fourth) and your new local.css file. Finally, your corporateclean.info file will contain the following code:

name = CorporateClean
description = CorporateClean: A flexible, recolorable theme with many regions.
version = VERSION
core = 7.x

stylesheets[all][] = style.css
stylesheets[all][] = color/colors.css
stylesheets[all][] = local.css

regions[search_area] = Search area
regions[highlighted] = Highlighted
regions[content] = Content
regions[sidebar_first] = First sidebar
regions[content_bottom_left] = Content bottom left
regions[content_bottom_right] = Content bottom right
regions[banner] = Banner
regions[footer_first] = Footer first
regions[footer_second] = Footer second
regions[footer_third] = Footer third
regions[footer_fourth] = Footer fourth
regions[footer] = Footer
regions[footer_bottom_right] = Footer bottom right
regions[help] = Help
regions[page_top] = Page top
regions[page_bottom] = Page bottom

settings[breadcrumb_display]= 1
settings[slideshow_display]= 1
settings[slideshow_effect]='scrollHorz'
settings[slideshow_effect_time]='10'

project = "corporateclean"

2. Edit the page.tpl.php file (sites/all/themes/corporateclean/page.tpl.php)

2.1 Place the following div with id content-bottom which contains the 2 new regions (Content bottom left, Content bottom right) just under the end of div with id sidebar:

.
.
.
<div id="sidebar">
     
    <?php print render($page['sidebar_first']); ?>

</div><!-- EOF: #sidebar -->

<div id="content-bottom">

    <div id="content-bottom-left">
    <?php print render($page['content_bottom_left']); ?>
    </div><!-- EOF: .footer-area -->
    
    <div id="content-bottom-right">
    <?php print render($page['content_bottom_right']); ?>
    </div><!-- EOF: .footer-area -->
    
</div><!-- EOF: #content-bottom -->
.
.
.

2.2 Modify the div with id footer to contain the new region footer_fourth:

<!-- Footer -->    
<div id="footer">

    <div id="footer-inside">
    
        <div class="footer-area first">
        <?php print render($page['footer_first']); ?>
        </div><!-- EOF: .footer-area -->
        
        <div class="footer-area second">
        <?php print render($page['footer_second']); ?>
        </div><!-- EOF: .footer-area -->
        
        <div class="footer-area third">
        <?php print render($page['footer_third']); ?>
        </div><!-- EOF: .footer-area -->
        
        <div class="footer-area fourth">
        <?php print render($page['footer_fourth']); ?>
        </div><!-- EOF: .footer-area -->
       
    </div><!-- EOF: #footer-inside -->

</div><!-- EOF: #footer -->

3. Create an empty .css file under the /sites/all/themes/corporateclean folder and name it local.css
Then, place inside the local.css file the following code:

#content-bottom { clear:both; display:block; padding:20px 0; }

#content-bottom-left { display:block; float:left; width: 450px; padding:0 60px 0 0; }

#content-bottom-right { display:block; float:right; width: 450px; }

.footer-area.first, .footer-area.second, .footer-area.third, .footer-area.fourth { width:220px; padding:0 25px 0 0; }

.footer-area.fourth { padding:0; }

4. Clear all cached data
This step is important in order to force your template to be informed for the changes you have made in the template files. To do this go to Administer » Site configuration » Performance » Clear cached data

Thanks
/George

gtsopour’s picture

Title: Adding a Region » Adding new regions (detailed instructions)
Anonymous’s picture

Title: Adding a Region » Adding new regions (detailed instructions)

These directions are terrific! Thank you! I've done something similar -- I want to break up the footer_bottom area into footer_bottom_left and footer_bottom_middle. I've made the changes to the .info and .tpl files, and I've assigned blocks to the new regions, but they're not being displayed. I've left the footer_bottom_right region the way it was, but that isn't displaying, either. And when I try to display the available regions for the theme, the 3 footer_bottom ones don't show up. It seems that the theme doesn't recognize any of the footer_bottom regions. What am I doing wrong?

gtsopour’s picture

Hello rmgross1,
have you cleared your Drupal's cache (Step 4) through Administer » Site configuration » Performance » Clear cached data?

Thanks
/George

worldon’s picture

Hi! This explanation is perfect but I couldn't find my corporate clen file...

It isn't in /sites/all/themes/corporateclean folder..The are the othere themes but not this!!

Any suggestions please??
Thank's in advanced!

avpaderno’s picture

Assigned: gtsopour » Unassigned
Issue summary: View changes
Issue tags: -Corporate Theme, -Corporate Clean Theme, -CorporateClean, -Adding new regions, -Drupal regions