Create new template positions for block placement
This little trick will let you create new template positions for your page.tpl.php, which you can use as containers for your blocks.
Add the following snippet to your template.php:
<?php
function mytemplate_regions() {
return array(
'left' => t('left sidebar'),
'right' => t('right sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer'),
'myposition' => t('my position name'),
);
}
?>Now replace 'mytemplate' with the name of your own template, and replace 'myposition' and 'my position name' with the details of your new template position. 'myposition' will become the variable name to place in page.tpl.php, e.g.:
<?php print $myposition ?>'my position name' is the descriptive name of the position that will appear in the Region dropdown list on the blocks configuration page.
Delicious
Digg
StumbleUpon
Reddit
Facebook
Technorati




