Re: template engine...why???

From: Date: Wed, 30 Apr 2003 17:59:46 +0000
Subject: Re: template engine...why???
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-145832@lists.php.net to get a copy of this message
I see all sorts of problems with this approach, the least of which is that you are using your own language constructs. You are no longer using native PHP. Rasmus, however, claims that it can all be done with PHP itself (if I understand his statements correctly). So, how can the example table be done entirely within PHP while keeping to the two constrains below? --- Seairth Jacobs seairth@seairth.com "Luis" <luis@fuegolabs.com> wrote in message news:014001c30f3d$ca8a7880$2b00a8c0@fuegolabs.com... > > > <table> > {section loop=$foo name=i} > <tr><td>{$foo[i]}</td></tr> > {/section} > </table> > > > > From: Seairth Jacobs [mailto:seairth@seairth.com] > > Can you tell me how you handle something like generating an arbitrary > number > of <tr>s in a table while: > > 1) Not using a runtime templating approach, and > 2) Still allowing the <table> and <tr> presentations to be altered (say, > switching to use of <divs>) without giving access to the underlying > logic. > > > "Rasmus Lerdorf" <rasmus@lerdorf.com> wrote in message > news:Pine.WNT.4.53.0304300801440.728@DELL... > > > > The only templating systems I can honestly say are complementary are > the > > ones that pre-generate pages so there is absolutely no run-time hit > from > > the templating system. Anything that parses template files and by > > whatever means does search and replace stuff at runtime is just > inherently > > nasty if you care about performance at all.

« previous php.general (#145832) next »