[Zope] How to concatenate variables

Dieter Maurer dieter@handshake.de
Sat, 15 Jun 2002 23:49:26 +0200


McDonnell, Larry writes:
 > Ok, how do you use <dtml-in concat_sub_type_to_part_num(st1,sub_type2)>? I
 > keep getting a key error. Can you use a python script passing variables in a
 > dtml-in statement?
Maybe, some background reading would help you:

       Zope Book or 

         <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

Your problem above it that the first attribute to most
DTML tags is treated as a shorthand for a "name" object attribute.
This means, the value is interpreted as a name for a variable/object
and not as an expression.

Use

	<dtml-in expr="concat_sub_type_to_part_num(st1,sub_type2)">


Dieter