On Thu, May 23, 2002 at 07:23:18PM -0700, Randal L. Schwartz wrote:
>       <tr bgcolor="[% colors.${loop.count % 2} %]">

Alas not.  The parser only accepts simple terms inside ${ }, the same
limitation as within ( ).  You would need to use an intermediate variable.

  [% colno = loop.count % colors.size %]
  <tr bgcolor="[% colors.$colno %]">

This gets my award for "Most Annoying Limitation in the TT2 Parser".  I
don't think it can be solved easily in the state-driven TT2 parser, but 
it has already been "fixed" in the recursive descent TT3 parser.  This is 
next on my list of TT3 modules to finish so hopefully we'll be able to 
graft the v3 parser into v2 at some point in the future.


A




Reply via email to