Re: [htmltmpl] Numeric loops
Brought to you by:
samtregar
From: Arkadiy <ar...@ar...> - 2007-04-30 13:10:40
|
Everybody else displays 5 stars, plus "refuse rating" and "Not Interested" options, and highlight current "popular" ratings and allow user to rank, in half increments. On 4/29/07, Alex Teslik <al...@ac...> wrote: > 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 puts logic in the template, > which is what HT is all about preventing. > > 2c > > > On Mon, 30 Apr 2007 12:11:08 +1200, 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 that to > > the template, which seems a lot of pointless effort > > > > Regards > > > > Dan > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Html-template-users mailing list > > Htm...@li... > > https://lists.sourceforge.net/lists/listinfo/html-template-users > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > |