i use different layouts for different pages for a large website, which share common header and footer. how can i create common header and footer templates and link the templates to these pages.
The most common is to structure your header and footer using the core block system. Another solution would be to place the structure in the
page.tpl.php. If you have a lot of
page.tpl.php files and still want to use templates, then it might be better to place the header and footer in the
Personally I would recommend using the blocks system.
Way to do this, creating region--header.tpl.php and region--footer.tpl.php, which contains the html structure for header and footer region. Make sure tat base template file region.tpl.php file is included.
For dynamic header and footer, use blocks. And for static header and footer section, write html code in the header and footer template files. And for semi-dynamic portion, combination of both can be used.
However there should be a block atleast in the header and footer region to take effect.