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