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.
Comments
Nancy at 18:44 on 22-Jan-2012
I know how hard it is to create a program. My friend also do have headache when he has already done running the program and then there is some changes or some additional input to be added. He found difficulties sometimes to locate the part that will be having some corrections or additional.
Nancy
Blog: broyeur de branchesÂ






