Wednesday, November 23, 2011

To Create Header Block for a Site

To Create Header Block for a Site:

If you are creating a site with the header that will come all the pages.Then we can use this method for that thing,create a block as Header then define it in page.tpl.php

Create a block in the name of Header and use this code to print the header in your top of the page.tpl file.Then only you will get that header in all those pages,

               <?php
                    $block = module_invoke('block', 'block', 'view', 1(block id));
                    print $block['content'];
                ?>

No comments:

Post a Comment