Re: IT, or templates in general - another approach

From: Date: Tue, 21 May 2002 17:11:44 +0000
Subject: Re: IT, or templates in general - another approach
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6297@lists.php.net to get a copy of this message
If there are only developers/technical people why use template engines at all? Keep the html in seperate files for the template effect and use short snippets of embedded php to do the dynamic parts. Using short tags, <?= and alternative control syntax makes it look pretty much like a template language anyway. the 'justification' (other than writing/evolving yet another templating engine :) - was that none of the existing engines have templates that could be edited totally using a frontpage/mozilla editor - that could survive the 'cheap editor hack attack'.. <?= something ?> dissapears on most 'cheap and nasty editors' :)
and try editing a file with this in it... <a href="<? echo $something ?>"> or even <a href="{some_template_format}">even in 'expensive editors' like dreamweaver it is difficult to configure it to not 'break the templating tags... other than that, some way of 'documenting the available variables', and having a sensible block/looping mechanism.. where the main reasons... ive worked with blocks in fast template - and had a quick browse through ITX(which I assumed was pretty similar), they are both a 'real pig' to code to.. an expensive trade off for the simplicity in the template Both templates methodlogies do the same basic stuff {sometag} get replaced with either <?=$something?> or THE_REAL_VALUE ...to the designer/html jockey they are unlikely to know the difference in the backend. As I think the profuseness of these engine show, there is no 'perfect' solution :) - just a number of ways to skin the cat... And I'm sure there where some interesting flame wars on php-template that are well worth wasting a few hours reading :) regards alan

« previous php.pear.dev (#6297) next »