Re: Conditional include
| From: | Andrei Zmievski | Date: | Thu, 19 Jul 2001 13:49:29 +0000 |
| Subject: | Re: Conditional include | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1203@lists.php.net to get a copy of this message | ||
On Thu, 19 Jul 2001, Andreas Aderhold wrote:
> Hi there,
>
> I often include files conditionally like this:
>
> {if $T_WARNINGS}
> {include file="formwarnings.html}
> {/if}
>
> but that's a bit un-handy. Maybe there is a a general need to implement a
> shorter syntax to conditionally include a file, e.g.:
>
> {include file="formwarnings.html" if=$T_WARNINGS}
>
> even cooler but would be (but harder to implement, I guess):
>
> {if $T_WARNINGS include file="formwarnings.html /if}
>
>
> What do you think?
Nope. Smarty is not designed with just programmers in mind, but also
with designers. I'd like to adhere to KISS principle as much as
possible.
-Andrei
* Only 19,999 lines of C++ to my next ski trip... *