[Zope] problem with let tag

Martijn Pieters mj@antraciet.nl
Wed, 29 Sep 1999 10:01:47 +0200


At 08:35 29/09/99 , Ainis wrote:
>Hello ALL,
>
>According to documentation zope.org this should work:
><dtml-let foo="blah">
><dtml-var foo>
></dtml-let>
>
>but it does not, I get an error
>Error Type: NameError
>Error Value: blah
>
>It seems that it considers blah as a variable, so how could I tell
>zope that it's just a string?

It indeed sees blah as a var, because everything between the double quotes 
is a DTML expression (based on python). To let the parser know it is a 
string literal, you'll have to place it in quotes (single or double). 
Double quotes will mess up your DTML, so you use single quotes:

   <dtml-let foo="'blah'">
     <dtml-var foo>
   </dtml-let>

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------