Re: [PHP Template] dynamic blocks
[email protected] (Andrei Zmievski)
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
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