Posts by smurkas

1 post
  • Has been part of the Envato Community for over 5 years
  • Has collected 1+ items on Envato Market
smurkas says

Umm you can actually already do what you propose in Smarty. Smarty doesn’t force you to include three separate files as header-content-footer, you can do the master template with one or more content areas instead if you want.

To use master template pattern you simply write {include file=”$tplName.tpl”} or whatever you want to call your file variable in the place that you want it included. Just set this variable to the content template you want to load and you’re done. In fact this is the basic example in Smartys tutorials which is where I got it from.

I think the header-content-footer pattern simply has been the most popular pattern for some time until people realised how much this sucked on sites with alot of markup.

by
by
by
by
by
by