Re: [SMARTY-DEV] Block/Section (in trad. sense) function needed?
| From: | Andrei Zmievski | Date: | Tue, 07 May 2002 13:33:45 +0000 |
| Subject: | Re: [SMARTY-DEV] Block/Section (in trad. sense) function needed? | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-81@lists.php.net to get a copy of this message | ||
On Mon, 06 May 2002, Monte Ohrt wrote:
> You can already do this block functionality with sections.
>
> {section name=foo loop=1 show=$show_foo}
> ...
> {/section}
>
>
> The programmer would set $show_foo depending on whether or not that
> section (block) should show. This is also more powerful than a plain
> {block ...} function because you have all the power of {section ...} at
> your disposal. This also cures your problem of blocks within sections ;-)
No need to use loop=1 in this case.
-Andrei
* Reality isn't all it's cracked up to be. *