Re: templates with php

From: Date: Tue, 01 Aug 2000 18:54:46 +0000
Subject: Re: templates with php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9513@lists.php.net to get a copy of this message
More cheerleading for Rasmus! :-) PHP *****IS***** a templating language. It may be the best templating language that exists. :-) If you want to separate code from content (a laudable goal, especially if you have multi-language sites or a big team), then don't cheat the designer: use eval() and execute their templates for them as PHP code. Pre-chew variables the way Rasmus suggests. There is no way to separate code from content, because HTML is a markup language--you inevitably want to throw in conditionals, loops, functions, then objects, dynamically-loaded libraries--voila, you've just programmed a PHP interpreter in PHP. :-) Of course, I'm biased since this is what I implemented as the "views" system for Terra Cotta (http://www.terracottasoftware.com). -Greg

« previous php.general (#9513) next »