Re: [SMARTY] {section} feature request
| From: | Monte Ohrt | Date: | Wed, 26 Jun 2002 15:26:31 +0000 |
| Subject: | Re: [SMARTY] {section} feature request | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5031@lists.php.net to get a copy of this message | ||
You already can.
{section loop=$FOO name=x}
{if $smarty.section.x.first}
... printed once ...
{/if}
... printed many times ...
{if $smarty.section.x.last}
... printed once ...
{/if}
{/section}
Roman Neuhauser wrote:
Hi Monte, {section} (and perhaps {foreach}) could IMO use the following enhancement. Background: we here found ourselves typing this far too often: {if sizeof($FOO)} ... printed once ... {section loop=$FOO name=x} ... printed many times ... {/section} ... printed once ... {/if} or {section loop=$FOO name=x} {if $smarty.section.x.first} ... printed once ... {/if} ... printed many times ... {if $smarty.section.x.last} ... printed once ... {/if} {/section} which is even more typing. It would be uber cool if this could be done with st. like this: {section loop=$FOO name=x} ... printed once ... {sectionbody} ... printed many times ... {/sectionbody} ... printed once ... {/section} Keep up the good work!-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.