Re: [PHP Template] Repeating values

From: Date: Wed, 01 Mar 2000 00:33:48 +0000
Subject: Re: [PHP Template] Repeating values
References: 1  Groups: php.template 
Request: Send a blank email to php-template+get-261@lists.php.net to get a copy of this message
Maybe we should leave that sort of thing for a phase II. I'm just concerned that this could easily get too complex for our customers, the designers... S. At 04:19 PM 2/29/00 -0800, Dan Libby wrote: >I think it would be a useful feature. However now you are starting to get into >the area of collation. Previously I worked with a template language that had >several options for collating multiple lists. It gets a bit tricky.... ;-) > >-dan > >Andrei Zmievski wrote: > >> 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 >> >> -- >> PHP Template Engine Mailing List >> Current engine specification can be found at: >> http://va.php.net/~andrei/tpl-engine-spec.txt >> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > > >-- >PHP Template Engine Mailing List >Current engine specification can be found at: >http://va.php.net/~andrei/tpl-engine-spec.txt >To unsubscribe, e-mail: php-template-unsubscribe@lists.php.net > .......................................................................... Sanford Redlich CNET: The Computer Network Director, Product Development http://www.cnet.com Product Development Group (415) 364-8380 CNET.com The source for computers and technology.

« previous php.template (#261) next »