22 Jun
2001
22 Jun
'01
12:04 p.m.
Hi all, I have a ZPT page which can optionally get a parameter, dn, which gets used in a call to a Script (Python). If I was doing this with DTML, I would use something like, <dtml-unless dn> <dtml-call "REQUEST.set('dn','o=cm')"> </dtml-unless> to set a default value for dn. However I can't quite figure out how to set default values for vars in a ZPT page. The best I've come up with so far is this: <span metal:fill-slot="userList_slot" tal:content="structure python:here.userList(dn=request.dn)" tal:on-error="structure python:here.userList(dn=None)">User List goes here</span> Which is fine if there is only one var but what if there are more? Any ideas? Phil phil.harris@zope.co.uk