[Zope] ZPT - equivalent of dtml-unless
Phil Harris
phil.harris@zope.co.uk
Fri, 22 Jun 2001 13:04:04 +0100
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