Re: section title block
| From: | Andrei Zmievski | Date: | Mon, 26 Feb 2001 14:42:07 +0000 |
| Subject: | Re: section title block | ||
| References: | 1 2 3 4 5 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-229@lists.php.net to get a copy of this message | ||
On Mon, 26 Feb 2001, Monte Ohrt wrote:
> To each their own I guess. I don't think of this as a workaround, I
> think of it as an added feature to be able to do something like this.
> This makes the section header/footer reusable, which would be likely in
> any case.
How likely is it that different sections will have the same
header/footer? Not very much, I think.
> If you really don't want to split your content out into separate
> templates, you can still use {if} statements:
>
> {section name=mystuff loop=$data}
> {if %mystuff.first%}
> <TABLE border=0>
> {/if}
> {* row data *}
> {if %mystuff.last%}
> </TABLE>
> {/if}
> {/section}
>
>
> Personally, I think making up new section tag names is a "workaround"
> and clutters the template syntax even more than this solution.
I don't see a big need for header/footer stuff either - I was just
replying to the original poster. Personally, a single {if count($foo) >
0)} around the whole section seems to be clean enough.
-Andrei
* Power corrupts. Atomic power corrupts atomically. *