Strange... it seems to have been a problem involving interaction with
the surrounding template. Chisel's simple example worked. Yet the TT
error specified the subtraction as the problem, and removing it caused
the template to work. Weird. We've reworked the template and the parse
error no longer occurs on the subtraction.

 

- Mark.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas,
Mark - BLS CTR
Sent: Saturday, July 19, 2008 10:42 AM
To: [email protected]
Subject: [Templates] subtracting one

 

I get a parse error with [% series.year - 1 %]. According to the thread
at
http://www.mail-archive.com/[email protected]/msg05821.html
, it is because it is being interpreted as a negative 1 instead of an
operator.

 

What's the workaround? I've tried:

 

[% series.year - (1) %]

[% series.year + -1 %]

[% one = 1; series.year - one %]

 

all to no avail.

 

-- Mark.

 

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to