Then I wonder what makes skol29 think PHP's "basic template features" are "too poor" to be used seriously? I think PHP's "basic template features" are phenomenal.
PHP is a nice and powerfull scripting langage oriented for Web developement. Let's look at what's it can do as a Template Engine.
-> place data items in a template: HTML ... <?php echo $myvar ?> ... HTML
-> repeat a zone with data items (*): HTML ... <?php for ($i=0;$i<=$iMax;$i++) { > HTML ... <?php echo $myvar[$i] ?> HTML ... <?php } ?>
-> Hide or display a zone: HTML ... <?php if ($test) { ?> HTML ... <?php } ?>
-> include an external part or subtemplate: HTML ... <?php include('subtemplate.php') ?> ... HTML
And that's it. I think you cannot do more without coding HTML with PHP commands, which wouldn't be making a template anymore.
(*) Note that FOR and FOREACH are the only way for repeating a zone of a template with basic PHP commands, and that's aleardy an algorithm.
While placing locators into a template shouldn't mean coding.
This is at the limit of template feature.
--------------------- Skrol29 www.tinybutstrong.com ---------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php