[Templates] "in array" function?
Chris Petersen
lists at forevermore.net
Wed Mar 5 22:46:32 GMT 2008
On Mar 5, 2008, at 12:40 PM, Andrew Marold wrote:
> How about [% IF foo.match('(foo|bar)') %] ?
That would work, assuming you added anchors to the regex and I'm only
ever matching against static lists and not pre-defined variables
(which in this case is the likely scenario).. but would also require
the template designers to understand regex (and a large reason to move
to TT is so the devs who understand regex don't have to do html work).
However, if that's the only option, it's easy enough to teach simple
regex like this. Thanks.
-Chris
More information about the templates
mailing list