How to add a region to drupal themes
|
|
|
|
| Locating the theme | |
| If you want to add a region to the default cti flex / Zen theme go the directory in which you have the cti flex default theme installed. In my case \sites\all\themes\cti_flex |
|
| Editing the files | |
| If you want to add a region you need to edit two files - page.tpl.php - cti_flex.info example: I want to add a region above the header logo called header top. |
|
| edit: page.tpl.php | |
|
<div id="header"><div id="header-inner" class="clear-block"> |
|
| edit: cti_flex.info | |
| regions[header] = header regions[header_top] = header top regions[footer] = footer |
|
| Adding block | |
| If you now go to Administer|Site building|Blocks a new region will appear with the name header top. | |
| Theming the block | |
| If you want to add some css edit the file cti-fles.css | |
|
/** ------------------------------- HEADER -------------------------------- **/ #header-top { height: 20px;} |
|
Comments
Post new comment