Re: [htmltmpl] Numeric loops

2007-04-29 Thread Alex Teslik
my $ratingloop = [ map { {RATING => $_} } (1..$ratingmax) ]; or something like that (untested). The effort seems pointless until the flexibility is used by the template designer to do something special at each rating... or something else no one has thought of yet. I'd go with the loop. TMPL_FOR p

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Mathew Robertson
>> If you just want to print 4 stars, then just do that. * * * * >> >> If you are looking for some indentation background, you could try >> something like the following on a div: >> >> style="background:url('star.gif') right repeat-y;" >> >> If you are looking for something like then you >>

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Karen
On 4/29/07, Dan Horne <[EMAIL PROTECTED]> wrote: > Well, I'm not "so" concerned (which to me implies some kind of fervour > that I don't think I stated). I was simply asking if there was a way to > iterate through integer values that I couldn't see in the POD - simple > so the designers could decid

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Dan Horne
On Sun, 2007-04-29 at 20:34 -0400, Michael Peters wrote: > Dan Horne wrote: > > Hi all > > > > Is there a way to loop from a lower integer to an higher one? For example, > > say an article has a rating of 4. I'd like to loop from 1 to 4 and print a > > star at each iteration. The only way I can se

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Dan Horne
On Mon, 2007-04-30 at 10:40 +1000, Mathew Robertson wrote: > > > > > Is there a way to loop from a lower integer to an higher > > one? For example, > > say an article has a rating of 4. I'd like to loop from 1 to > > 4 and print a > > star at each iteration

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Mathew Robertson
> > Is there a way to loop from a lower integer to an higher one? For > example, > say an article has a rating of 4. I'd like to loop from 1 to 4 and > print a > star at each iteration. The only way I can see of doing this is > create an > array ref in the perl coder an

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Dan Horne
On Sun, 2007-04-29 at 19:22 -0500, Karen wrote: > On 4/29/07, Dan Horne <[EMAIL PROTECTED]> wrote: > > Is there a way to loop from a lower integer to an higher one? > For example, > say an article has a rating of 4. I'd like to loop from 1 to 4 > and print a >

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Michael Peters
Dan Horne wrote: > Hi all > > Is there a way to loop from a lower integer to an higher one? For example, > say an article has a rating of 4. I'd like to loop from 1 to 4 and print a > star at each iteration. The only way I can see of doing this is create an > array ref in the perl coder and pass t

Re: [htmltmpl] Numeric loops

2007-04-29 Thread Karen
On 4/29/07, Dan Horne <[EMAIL PROTECTED]> wrote: Is there a way to loop from a lower integer to an higher one? For example, say an article has a rating of 4. I'd like to loop from 1 to 4 and print a star at each iteration. The only way I can see of doing this is create an array ref in the perl c

[htmltmpl] Numeric loops

2007-04-29 Thread Dan Horne
Hi all Is there a way to loop from a lower integer to an higher one? For example, say an article has a rating of 4. I'd like to loop from 1 to 4 and print a star at each iteration. The only way I can see of doing this is create an array ref in the perl coder and pass that to the template, which se