[wp-hackers] Separation of Application Logic from

Michel Valdrighi michelv at gmail.com
Sat Sep 3 13:40:23 GMT 2005

On 9/3/05, Michael Huynh <mike.huynh at gmail.com> wrote:
> I think Amit has the right idea here. PHP itself is a templating
> engine so why go and bloat the code with Smarty which is essentially a
> convoluted replacement of PHP code? I tend to agree with this template
> engine author says about using PHP based templates:
> http://www.massassi.com/php/articles/template_engines/
> In all however, I like WP's template solution (not the admin panel
> side) very well. If the complaint is that the admin section cannot be
> templated easily, why not just write the admin section to have
> templates like the blog pages?

Please take a layman's point of view for a minute, and open the
default theme's sidebar.php.
Come back and tell us how intelligible it is.

An hypothetical switch to Smarty shouldn't be about blanket string
replacement of PHP stuff into Smarty stuff. It should come with a
re-thinking of the templates: for example, just because you can use
conditionnals doesn't mean you should.

As for templating the admin area, there's just so much logic in there
that the best we could do is come up with the best markup, the most
meaningful plugin hooks, and call it a day. Then let people use
alternate stylesheets if they want to.

Michel Valdrighi
Devéloppeur Web Intraordinaire

More information about the wp-hackers mailing list