Re: Template Proposal
| From: | Alexander Wagner | Date: | Thu, 08 Nov 2001 20:29:55 +0000 |
| Subject: | Re: Template Proposal | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-2691@lists.php.net to get a copy of this message | ||
Joao Prado Maia wrote:
> Please explain to me why using IT[X] and then calling your template
> variables {VARIABLE} is any easier than {$VARIABLE}.
That's not what I meant.
> Because you can
> do really simplistic stuff like that with Smarty just fine. Whats the
> deal here ?
>
> If you don't want to use the more complex options, like Smarty's
> control structures, don't use it.
IT[X] does have something like control structures. They are called
blocks. The difference is that Smarty's sections are controlled from
within the templates whereas blocks are controlled by the PHP-code that
provides the data.
It's just a matter of whether the control should be in the template. If
you plan to use a 'dumb' designer, it's generally a good idea to make
the templates as simple as possible.
For more on this topic, have a look at my other mails.
regards
Wagner
--
"Ein Mathematiker ist eine Maschine, die Kaffee in Theoreme verwandelt."
Paul Erdös, Mathematiker, 1913-1996