[Templates] New VMethod?
[prev]
[thread]
[next]
[Date index for 2004/07/06]
I'm curious if others have had this issue enough to warrant a common new
VMethod (or altering an existing one).
It's quite common for me to deal with lists of hashes in my database
apps (representing results from my DB queries). I suspect that's true
for many people.
Quite often the templates want to deal with a list of the values of a
particular key. For example, the code returns a list of hashes. The
template might just display that, or might want to offer select boxes
of the various fields. In the latter case, I want to have some easy way
to deal with that data without dropping "programming" into the template
and confusing my designers.
I'm thinking something like:
[% FOREACH Item = Items.values("email").unique %]
#do something
[% END %]
Do others also run into this?
--
SwiftOne / Brett Sanger
swiftone@xxxxxxxx.xxx
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] New VMethod?
Brett Sanger 16:32 on 06 Jul 2004
|