[ciapug] Templating System
Jerry Weida
jweida at gmail.com
Fri Jun 24 09:06:14 CDT 2005
I think just about anyone will agree that the PEAR template system is
lacking and sluggish at best.
I favor the Smarty template system. It has always worked very well for me in
the past and it allows you to choose the complexity of the tempaltes you
write as it can handle some PHP in the template itself. The built in caching
system makes it extremely fast as well.
On 6/24/05, Dave J. Hala Jr. <dave at 58ghz.net> wrote:
>
> That's a good point. I'll buy that.
>
> However, if keep you it simple, you won't have that vulnerability. I
> think that a "template" like the one below is fairly safe. The Java
> script is couple of tools that format date/ssn & phone numbers on the
> fly.
>
>
>
> <html>
> <head>
> <title> <? echo $title ?></title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <meta http-equiv="Pragma" content="no-cache">
> <script language="JavaScript" src="/java/ssn-date-phn.js"
> type="text/javascript" ></script>
> <style type="text/css">@import "../css/main.css";</style>
> </head>
> <body bgcolor="#ffffff" >
> <? echo $page ?>
> </body>
> </html>
>
> On Fri, 2005-06-24 at 08:25, Tony Bibbs wrote:
> > This best sums up why PHP isn't such a good template engine:
> >
> >
> http://www.akbkhome.com/blog.php/View/80/PHP+as+a+template+engine%2C+or+recipe+for+disaster%3F.html
> >
> > In short, you have to save developers from themeselves sometimes.
> >
> > --Tony
> >
> > Dave J. Hala Jr. wrote:
> > > I was thinking about what Tim said the other day regarding "templating
> > > systems". I think the main point was: how is inserting a <? echo
> > > $content ?> tag into an html document really any differant than if you
> > > just inserted some if/then logic etc.
> > >
> > > I agree with Tim, its more or less the same thing. For me, the problem
> > > that I was trying to solve two-fold:
> > >
> > > 1. Seperate the dynamically generated content from the static content,
> > > so that an end user (or graphic designer) could edit the html without
> > > mucking around in the php code.
> > > 2. Make it user to make changes to the CSS include files, thereby
> making
> > > it simple to effect system wide cosmetic changes in the both the html
> > > and the dynamically generated content.
> > >
> > > Tim did you have something else in mind?
> > >
> > > :) Dave
> > >
> > >
> > >
> > >
> > _______________________________________________
> > ciapug mailing list
> > ciapug at cialug.org
> > http://cialug.org/mailman/listinfo/ciapug
> --
>
> Open Source Information Systems (OSIS)
> Dave J. Hala Jr. <dave at osis.us>
> 641.485.1606
>
> _______________________________________________
> ciapug mailing list
> ciapug at cialug.org
> http://cialug.org/mailman/listinfo/ciapug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/ciapug/attachments/20050624/0fc9f52c/attachment.htm
More information about the ciapug
mailing list