not a true template system

pngwen <[email protected]> 30 Jul 2003 14:18:27 -0000
Newsgroups gmane.comp.web.oscommerce.devel
Message-ID <e0edf4019f3a13b6f508d57c91550523@osCommerce-Forums>
This message was sent from: Development
http://forums.oscommerce.com/viewtopic.php?p=204363#204363
----------------------------------------------------------------

A templating system is somthing that separates code from content.  A successful one is one that can be used and understood by a graphics developer, not a programmer.

What you have is just a fancy include tree for php code.  THIS IS NOT A TEMPLATE SYSTEM!

smarty would be a good option to use.  This would enable people to use an html editor to create the layout for a page and then it would allow the code to interact with it.  Your templating system is nothing more than PHP inclusions, and so it would exclude a non php programmer from editing the look and feel of the site.

The alternative would either to be to develop your very own template system (and therby reinvent the wheel) or use one that is already created.  I've been using smarty for almost a year now and I would have to say it is the best.  It is very fast, and easy for a non programmer to use.  Also, it compiles the templates into php making only the initial load of a newly revised template subject to a lot of the performance issues that text parsing presents.  

I propose adopting smarty for this reason.  In fact, I am willing to create the smarty template interface myself, which I would then contribute to the codebase.  I would work within the cvs repository version to insure it doesn't lag behind development.

Once again, I cannot stress the importance of this enough, what you have implemented is not a templating system.  If you could call it one it is a templating system in its most loosely defined form, and while simple to impliment, it will prove useless to the average web layout/graphic designer.