Re: [PHP Template] dynamic blocks
| From: | Andrei Zmievski | Date: | Wed, 16 Feb 2000 22:56:21 +0000 |
| Subject: | Re: [PHP Template] dynamic blocks | ||
| References: | 1 2 3 4 | Groups: | php.template |
| Request: | Send a blank email to php-template+get-93@lists.php.net to get a copy of this message | ||
On Wed, 16 Feb 2000, Dan Libby wrote:
> So they are already going to see the variable names when viewing static html.
> {foo}. What is so wrong with also seeing the dynamic declarations?
>
> The only viable alternative I see is angle brackets, but having used such a
> system, I can say that it gets *very* confusing, when you start having things
> like:
>
> <section: link>
> <a href="<link>"><font face="<fontface>"
> size="<fontsize>"
> color="<fontcolor>"><linktext></font></a>
> </section: link>
>
> compare that to:
>
> {section: link}
> <a href="{link}"><font face="{fontface}"
> size="{fontsize}"
> color="{fontcolor}">{linktext}</font></a>
> {/section: link}
>
> I think that whatever we decide, it should be consistent between variables,
> sections, and any other tokens we decide to use, such as ifs.
>
> Note, I actually prefer "{{" to "{" because it means that people won't
> need to
> escape single "{", which are a more common occurrence.
I actually agree with Dan here. I don't like mixing template language
with HTML - it's just messy, and then you have a different convention
for printing vars using $. I think using {{ and }} for everything should
be fine.
-Andrei