Re: [PHP Template] Revised proposal
[email protected] (Dan Libby) Thu, 17 Feb 2000 15:10:20 -0800
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
my system actually had an alt="value" tag for unknowns. So for example:
Welcome to {{sitename alt="Mysite.com"}}
I think it is a pretty clean way of handling it in the templates without any
code changes required. There was also an option to autohide an entire
section if it contained unknowns with no alt attributes. This is useful for
example to hide a table when no results are returned.
-dan
"Travis E. Sitzlar" wrote:
> >
> > Handling unnknowns is planned via .ini or some other setting. It will
> > either silently remove unknowns, loudly complain about them, or turn
> > them into HTML comments.
> >
>
> This might be a dumb idea, but why not have an option to do an implicit
> tpl_assign on unknowns? I.e., if a block of code such as
>
> {if: $title != "foo"}
> <b>$title</b>
> {else:}
> <b>none</b>
> {/if:}
>
> is encountered but there is no $title assigned, why not have a way of
> auto-assigning $GLOBAL['title']?
>
> Just a thought; seems that this could be a very good fallback feature for
> simplicity...
>
> Travis Sitzlar