Repeating values
[email protected] (Andrei Zmievski) Tue, 29 Feb 2000 08:47:29 -0600
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
Right now the spec mentions the following:
* repeat = yes/no
repeat the last value of the variable inside the section loop
if the other variables have more values, if not specified,
defaults to yes
I'm wondering if it should be extended to allow either repeating of the
last value the variable has, or of the default value. Example:
{{ section sec1 }}
{{ $foo default="green" repeat=yes }}, {{ $bar }}
{{/section sec1 }}
If $foo has 2 values ("red" and "blue"), and $bar has 4 values ("small",
"medium", "large", "x-large"), then "blue" will be repeated:
red, small
blue, medium
blue, large,
blue, x-large
If we specify repeat=default, though, it would do:
red, small
blue, medium
green, large
green, x-large
Would this be a useful behavior or not?
-Andrei
Any sufficiently advanced Operating System
is indistinguishable from Linux.
- Jim Dennis