[Zope] Unable to form a string with other strings

Evan Simpson evan@4-am.com
Fri, 05 Nov 1999 22:20:11 +0000


Willie Peloquin wrote:

> <!--#call "REQUEST.set('mapUrl', 'http://www.mapquest.com/cgi-bin/'
>     'ia_free?width=800&height=500&'
>     'streetaddress=<dtml-var address>&'
>     'city=<dtml-var city>&'
>     'state=<dtml-var state>'
>     )"-->
>

You can't use DTML inside of DTML; just refer to the variable directly.  With
Python's format operator this would be:

<dtml-call "REQUEST.set('mapUrl', 'http://www.mapquest.com/cgi-bin/'
    'ia_free?width=800&height=500&'
    'streetaddress=%s&'
    'city=%s&'
    'state=%s' % (city, state, zip)
    )">

Cheers,

Evan @ 4-am