Membuat Block Region pada Drupal
Creating regions in Drupal is easy. Here is a super quick tutorial to get you started. This tutorial assumes that you have Drupal installed, as well as a theme. Just in case you don’t know, a region is a place on your site in which you can place blocks. For our tutorial, we will make a region called “Content Top.” This will be displayed directly above the main content of your site. The process is the same for any region except for the code placement in your page.tpl.php file, so if you don’t need this particular block, feel free to modify the steps as necessary. 1) Open your themename.info file and place the following code: There should already be some regions declared. Put this code in the same area. If you are creating a different block, simply change the name. The name inside the brackets will be the variable name to be printed in page.tpl.php, and the name after the equals sign will be the name of the region in the administration section of the site. 2) Open your page.tpl.php file and place the following code right before the $content line: 3) Save and upload both files 4) Now, go to your site and navigate to admin/settings/performance. 5) Go to the bottom of the page and press “Clear Cache.” 6) You can now go to the block administration page and put a block in your new region. If you would like a block region somewhere else on your site, then instead of placing the code before the $content declaration, place your code someplace else. For example, if you wanted to make a “Content Bottom” region, put the code after the $content variable. This is a very simple process, and quite handy for adding content controllable through the administration section of a Drupal site.
regions[content_top] = Content Top
<?php if ($content_top): ?>
<?php print $content_top ?>
<?php endif; ?>
<?php print $content?>