Okay, so you have a Drupal-based website. You notice that the theme you are using has block regions all over the page for you to place content into (head, sidebar 1, sidebar 2, main content, footer 1, footer 2, footer 3, etc.). However, you want to add a custom block to your pages. Here’s what to do.
Go into your Drupal’s theme folder and look for a file that ends in .info. It will look something like this…
regions[featured] = Featured regions[content] = Content regions[sidebar_first] = Sidebar first regions[sidebar_second] = Sidebar second
Add your region by naming it something inside the brackets and after the = sign. Like this, for example…
regions[my_sidebar] = My Sidebar
Then look for a file nearby called page.tpl.php. You will then need to have the new block region print out to the page by placing the following somewhere on the page.
<?php if ($page['my_sidebar']): ?>
<div id="my_sidebar">
<?php print render($page['my_sidebar']); ?>
</div>
<?php endif; ?>
After a little trial and error, you can have it appear where you like. Then you simply place things in the block using the Drupal interface.
