in reply to Re: HTML::Template::Compiled - TMPL_EACH
in thread HTML::Template::Compiled - TMPL_EACH
ability to "sort by keys" when we use TMPL_EACH.I've thought about that. I was actually thinking about to sort by default, so I would change it internally to a loop over keys(). One wouldn't use the unsorted output anyway in production, I guess. What about an attribute CMP which can have the values num or alpha?
edit: I just coded it, it's an easy change.
<%each hash sort=num %>...
Now one
would probably like to have the possibility to reverse
the sort order and to sort by values. I'm open to any suggestions on this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: HTML::Template::Compiled - TMPL_EACH
by mmanso (Initiate) on Sep 05, 2008 at 23:53 UTC | |
by tinita (Parson) on Sep 06, 2008 at 02:26 UTC | |
by mmanso (Initiate) on Sep 06, 2008 at 16:03 UTC |