Pages

Wednesday, March 6, 2013

how to add/create a new block in drupal?

To create a new block region just need to following things..
1. In .info file we need to add block name like..
     regions[sidebar_second] = Sidebar Second
2. Then goto template page and add the below code wherever you want add the block of region.
    <div id="right1" class="clearfix">
            <?php print render($page['sidebar_second']); ?>
     </div>
Note: need to give div id unique

No comments:

Post a Comment