- 9
- A
- A Block
- A Cold Day
- A Sync
- A cloudy day
- A3 Atlantis
- AD Blueprint
- AD Lemon Twist
- AD Novus
- AD Novus Fluid
- AD Redoable
- AD The Morning After
- ADT Basetheme
- AT Admin
- AT Koda
- AT Subtheme
- Aardvark
- Abac
- Abaca
- Abarre
- Aberdeen
- Aberdeen-liquid
- Abessive
- Ability
- About
- Aboutpeople
- Absolution
- Abstract
- Absynthe
- Abundant
- Acquia Marina
- Acquia Prosper
- Acquia Slate
- Acrylic
- Active NRebuild
- Activesite
- AdaptiveTheme
- Adaptivetheme Mobile
- Addari
- Aeon5
- Affaires
- Agregado
- Agua
- Airy Blue
- Alagna
- Alek 2.0
- Alina
- Alpha
- Amadou
- Amity Island
- Amor Azul
- Analytic
- Andreas 00
- Andreas
- Andreas00
- Andreas01
- Andreas02
- Andreas03
- Andreas04
- Andreas05
- Andreas06
- Andreas07
- Andreas08
- Andreas1024px
- Anita Kravitz
- Antique Modern
- Appleweb
- Aqua Fish
- Aquanaut
- Arclite
- Art School
- Arthemia
- Artists C01
- Artsy
- Aurora
- Aurora Australis
- Austere
- Austin
- Autumn Almanac
- aBeesParadise
- art4 green
- async
- awesome
- B
- B7
- Barlow
- Barron
- Barroness
- Basic
- Beach
- Beginning
- BeginningW2
- Berylizer
- Black Mamba
- Blackout
- BlogBuzz
- Blommor01
- Blossom
- Blue Bars
- Blue Citron
- Blue Lake
- Blue Nile
- Blue Zinfandel
- BlueTrip
- Bluefun
- Bluemarine
- Bluemarine ETS
- Blueprint
- Bluespan
- Bookstore
- Box_grey
- Burnt
- Burnt Rubber
- beMiracle Browny
- beat
- blix
- bluebreeze
- bluebreeze fixed
- box_cleanslate
- C
- Bisque
- Black
- Blue
- Brown
- CDMUG
- CTI Flex
- CWS
- Camaxtli
- Camsel
- Candy Corn
- Canvas
- Celju
- Chai Garam
- Chameleon
- Channel Nine
- Charity
- Chartreuse
- Cherry Blossom
- Christmas
- Chrono
- Chrysalis
- Clean
- Clean A
- Cleanfolio
- Cleanr
- Cleanstate - Liquid
- Cleanstate
- Clearblue
- Clearlooks
- Color Paper
- Color Paper Green
- Color Paper Orange
- Color Paper Pink
- Color Paper Purple
- Color Paper Super
- Colorart
- Colorfulness
- Colourise
- Combustion
- Contented7
- Contrast
- Coolweb
- Cornflower Blue
- CristalX4Drupal
- Deep Sky Blue
- Navy
- Orange Red
- Red
- Rhododendron Pink
- Turtle
- White
- changeme
- clear_dark
- coolwater
- D
- Drupal
- E
- F
- G
- GBIF
- Gainsboro
- Gardening
- Garfirst
- Garfish
- Garland
- Garland Accessible
- Genesis
- Genesis DARK
- Genesis LITE
- Genesis SUBTHEME
- Genesis Typo 1
- Genesis WebX
- Genesis Webify
- Genesis Zine
- German Newspaper
- Giordani
- GlossyBlue
- Gnifetti
- Golden Hour
- Goldfish
- Goofy
- Grass
- Grassland
- Green House
- Green'n'Black
- Greeny_Blu
- Gulmohar
- greens
- H
- I
- J
- K
- L
- M
- N
- O
- P
- Q
- R
- S
- Salamander
- Salamander Skins
- SanQ
- SanQReaL
- Sandium
- Sandtiger
- Sapo
- Scaccarium
- Scratch
- Scruffy
- Sea Breeze
- Seven
- Shallow Grunge
- Sharepoint-like
- Simpla - Liquid
- Simpla
- Simple Blog
- Simpler
- Simplex2
- Simply Green
- Simply Modern
- Sky
- Skyliner
- Skyroots
- Slash
- Slash black
- Slash blue
- Slash green
- Smooth Blue
- Social Networking Dream
- Solarflare
- Soldier
- Sports
- Spring Bloom
- Spring Theme
- Stark
- Starkish
- Stasis
- Strange Little Town
- Strix
- Summertime
- Sunny Sky
- Sunset
- SuperClean
- SynFox
- T
- The Big List
- U
- V
- Validators
- W
- X
- Y
- Z
Closure, Page top, and Page bottom
Submitted by peter on Mon, 04/26/2010 - 15:28
Drupal 7 replaces the Drupal 6 Closure region with Page bottom and adds a matching Page top region for symmetry. You can change your Drupal 6 themes now to be ready for the change.
For this discussion, we will name our theme Aardvark after the wondrous and flexible Aardvark best known for a having a weird name.
Before launching into this change, make sure you add the code changes mentioned in Notes on converting a Drupal 6 theme in preparation for Drupal 7.
.info file
Your theme .info file might contain the following region definition or it might just inherit the Drupal default regions.
regions[closure] = ClosureWhen you add any region entry to your .info file, you have to define all the regions. Your definitions are not added to the default regions, they replace the default list. Define all your current regions then replace Closure with Page top and Page bottom. You should have a set of region definitions containing the two following additional definitions.
regions[page_top] = Page top
regions[page_bottom] = Page bottompage.tpl.php
Your theme contains a page.tpl.php file to print out the page and place the regions within the page. You added a $d7 variable and a conditional statement in Notes on converting a Drupal 6 theme in preparation for Drupal 7. This page uses the conditional statement.
Place the following code in the conditional statment. The Drupal 6 theme will add Closure to Page bottom then proceed the same way as Drupal 7. You can add other modifications to either the D7 part or the D6 part.
if($d7)
{
}
else
{
$page_bottom = $page_bottom . $closure;
}
Page top
Find the following line in page.tpl.php.
<body class="<?php print $body_classes; ?>">Add a line straight after the body line so you now have the following code.
<body class="<?php print $body_classes; ?>">
<?php print $page_top; ?>Page bottom
Find the following line in page.tpl.php.
<?php print $closure; ?>Replace $closure with $page_bottom to create the following code.
<?php print $page_bottom; ?>Footer or Closure/Page bottom?
The Footer region is the right region to output information at the bottom of your page. Closure is used to output non display data including Google analytics HTML. Closure contains everything you want to send out after the page content is displayed. You should not need theme settings for Closure or Page bottom.
Some browsers do not display anything until they hit the end of the HTML. For those browsers, you really need to use some Javascript to include additional material after the body load completes.
Theme the new regions
Add whatever theme you require for the new regions. If you do not theme Closure, do not theme Page bottom or Page top.
Content block title
Content block body. This block shows you what a block looks like in the content region.
