Re: template engine...why???
| From: | Justin French | Date: | Wed, 30 Apr 2003 00:59:20 +0000 |
| Subject: | Re: template engine...why??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145718@lists.php.net to get a copy of this message | ||
on 30/04/03 12:18 PM, Ryan A (ryan@jumac.com) wrote:
> Why use a template engine?
>
> isnt it much easier to include a header and footer file with "include"?
>
> eg:
> <?php include "headerblah.php" ?>
>
> thats soooo much easier that learning some templating "language"...isnt it?
> I visited the smarty template site.....
Most of the templates out there are, as you pointed out, another language
which need to be learnt. The upside of this is that it's VERY easy for
multiple designers, content authors, editors, etc etc to collaborate on a
project with (relative to PHP) small learning curve, and simple syntax.
The downside is that any template language will obviously have huge
limitations in comparison to PHP's feature set.
I personally don't collaborate. My clients either give me text, or edit it
themselves via my CMS suite, so I don't need the simplicity OR the
limitations of using this style of template engine.
I've developed my own 'template' system, which is based on includes and
common PHP syntax, NOT a new sub-language.
For me, this works better. For others with a different set of circumstances
and requirements, it would not.
I guess you need to establish your needs, and decide which route is best.
Justin French