Re: [PHP Template] dynamic blocks

From: Date: Thu, 17 Feb 2000 00:05:10 +0000
Subject: Re: [PHP Template] dynamic blocks
References: 1 2 3 4 5 6  Groups: php.template 
Request: Send a blank email to php-template+get-98@lists.php.net to get a copy of this message
Andrei Zmievski wrote: > > On Wed, 16 Feb 2000, Monte Ohrt wrote: > > This works too, its a new tag for the designer to > > learn, but usable. again, maybe name attributes like so: > > > > {section: name=link} > > <a href="{link}"><font face="{fontface}" > > size="{fontsize}" > > color="{fontcolor}">{linktext}</font></a> > > {/section: name=link} > > > > {if: {title} != "foo"} > > <b>{title}</b> > > {else:} > > <b>none</b> > > {/if} > > I don't see why you'd need to put {..} around vars in {if: } construct. > > -Andrei It would probably work without the braces, but then you have two separate formats of your variables in the template. We have a better consistancy in that regard with this format: {if: $title != "foo"} <b>$title</b> {else:} <b>none</b> {/if} or the other idea with html markup: <if: $title != "foo"> <b>$title</b> <else:> <b>none</b> </if> I'm not sure if the colons are needed or not. Monte

« previous php.template (#98) next »