Re: [PHP Template] dynamic blocks

From: Date: Thu, 17 Feb 2000 04:37:13 +0000
Subject: Re: [PHP Template] dynamic blocks
References: 1 2 3 4 5 6 7  Groups: php.template 
Request: Send a blank email to php-template+get-103@lists.php.net to get a copy of this message
On Wed, 16 Feb 2000, Monte Ohrt wrote: > 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} Actually, I'm starting to think that having $ in front of variables is better. {{$varname}} would print the variable, and then you can refer to them in if statements in the same manner. What does everyone think about consistency of using : to delimit commands? In the above example there is : after 'else' but not after '/if', is that OK? Should 'else' not have :? What about named attributes for commands, i.e. {{section: name = header}} instead of {{section: header}}? -Andrei

« previous php.template (#103) next »