Home » Smarty14 July 2008

Smarty: Include header and footer template

In previous article, I had written about installing and using Smarty. In this article, I will be showing how you can include header and footer in Smarty.

index.php assigns contents and calls the template file index.tpl

header.tpl contains the header part of html

footer.tpl contains the footer part of html

index.tpl contains the body of the html and it also calls header.tpl and footer.tpl. You can see that this template file also uses smarty date function to display current date.

Hope it helps.
Thanks.

Smarty

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Your guidelines will make my work easier and less time consuming to modify the header and footer content .Thanks for posting this information.

  • quite interesting… it is nice to see nepali website also opting to better technologies as well as adapting to newer technologies like smarty as well.