Re: Limiting the section loop
| From: | Andrei Zmievski | Date: | Tue, 26 Jun 2001 16:50:18 +0000 |
| Subject: | Re: Limiting the section loop | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-990@lists.php.net to get a copy of this message | ||
On Tue, 26 Jun 2001, Monte Ohrt wrote:
> Same behavior as show=false. I could see if you are setting max with a
> variable, you would want 0 to not loop.
>
> >
> > {section loop=$input max=-4}
> > {/section}
>
> syntax error, max must be >= 0.
And what if you are setting max with a variable?
> > {section loop=5 max=0}
> > ...
> > {sectionelse}
> > ... does this get shown when max <= 0?
> > {/section}
>
> Yes, same behavior as show=false
Okay.
>
> Also, how about the "skip" and "step" attributes? ;-) step could allow
> you to traverse the elements backwards!
Okay.
-Andrei
* How would this sentence be different if Pi was equal to three? *