[ciapug] Templating System
Carl Olsen
carl-olsen at mchsi.com
Fri Jun 24 16:23:56 CDT 2005
I have the book and it's helped me understand Smarty. I was trying to
figure out how to get a PHP script to run inside a Smarty template, and
"Essential PHP tools" explains how to do it. It looks like you can do most
anything you want to do from inside a Smart template. I didn't like Smarty
templates until I learned how to do this. It's a good book.
Carl
http://www.carl-olsen.com/
-----Original Message-----
From: ciapug-bounces at cialug.org [mailto:ciapug-bounces at cialug.org] On Behalf
Of Dave J. Hala Jr.
Sent: Friday, June 24, 2005 9:14 AM
To: Jerry Weida; PHP List
Subject: Re: [ciapug] Templating System
I looked at Smarty. I thought it was slick. The problem I ran into was
that I needed more control. However, I would use it if was doing more
small projects with simpler forms.
There's book called "Essential PHP tools" by David Sklar that has lots
of examples of Smarty, XML_RPC, Soap and other handy PHP stuff. The ISBN
number is: 1-59059-280-8
:) Dave
On Fri, 2005-06-24 at 09:06, Jerry Weida wrote:
> 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+reci
pe+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
>
>
>
> ______________________________________________________________________
> _______________________________________________
> 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
More information about the ciapug
mailing list