On Tue, 3 Mar 2009 20:46:40 +0000, stuttle wrote:

>As far as templating systems go I personally don't think they add anything
>to the equation unless you're working with designers who are already
>familiar with something. Separation of logic and content is important,
>abstraction away from PHP is not (IMHO).

Yeah, I've been meaning to ask about that myself - what benefit is there
in using something like Smarty, which requires learning yet another set
of notation, over just having a class/interface for the page and calling
methods on that in plain-old PHP from the template?

--- the PHP page (e.g. index.php) ---

$page = new YourPageClass();
require_once 'include/template.php';

--- template.php ---

<title><?php $page->showPageTitle();?></title>
<?php $page->showCustomHeaders();?>
<?php $page->showMenu();?>
<?php $page->showContent();?>

--- snip ----

For that matter, why go with Smarty over the more widely supported
(across multiple languages) XSL?

Maybe I'm missing something, but I don't see the point of special
templating systems that require you to know yet another notation set,
i.e. abstraction away from PHP as Stuart puts it.
Ross McKay, Toronto NSW Australia
"Click me, drag me, treat me like an object"

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to