Perrin Harkins wrote:
Hear, Hear for picking it in code rather than the template. :)On Tue, 2006-07-18 at 18:02 +0100, Gavin Henry wrote: But, the needy might also look at the ListUtil Plugin. It has a random list item function. http://search.cpan.org/~markf/Template-Plugin-ListUtil-0.02/lib/Template/Plugin/ListUtil.pm Or make your own Stash OP for it: use Template::Stash; $Template::Stash::LIST_OPS->{ random } = sub { return $_[0][rand @{$_[0]}] ;}; --mark mills |
- [Templates] Lists and rand like http://f... Gavin Henry
- Re: [Templates] Lists and rand like... Todd Freeman
- Re: [Templates] Lists and rand like... Perrin Harkins
- Re: [Templates] Lists and rand ... Mark Mills
- Re: [Templates] Lists and r... Gavin Henry
- Re: [Templates] Lists a... Perrin Harkins
- Re: [Templates] Li... Gavin Henry
- Re: [Templates] Lists and rand like... Paul Seamons
- Re: [Templates] Lists and rand ... Paul Seamons
- Re: [Templates] Lists and rand like... Gavin Henry
- Re: [Templates] Lists and rand ... Paul Seamons
- RE: [Templates] Lists and rand like... Garrett, Philip \(MAN-Corporate\)
