[Templates] IN keyword?

Andy Wardley abw at wardley.org
Mon Oct 8 09:01:55 BST 2007


Paul Makepeace wrote:
> [% IF val IN c.req.param(name); 'checked="checked"'; END %] />

Add my vote for grep()

   [% 'checked="checked"' IF c.req.param(name).grep(val) %]

It works equally well if c.req.param returns a scalar or list ref.

A



More information about the templates mailing list