[Zope] Q: what is the parameter "_.None" in calls to document templates?

Martijn Pieters mj@antraciet.nl
Mon, 20 Sep 1999 14:17:49 +0200


At 13:40 20/09/99 , Joerg Wittenberger wrote:
>Within the "common/Contacts" there are some DTML documents, one for
>each person.  Those documents have properties like "surname" etc.
>
>There is also a dtml method "asOptions" like that:
>
><dtml-in "objectValues('DTML Document')">
><option value="<dtml-var id
> >"><dtml-var firstname> <dtml-var surname
> ></option>
></dtml-in>
>
>I tried to call that DTML method from within the "docs" folder, but
>the result I see is quite not what I want.  I did:
>
><selection name="xyz">
><dtml-call "common.Contacts.asOptions(_.None, _, REQUEST)">
></selection>
>
>This way no options at all are found.  I also tried to modify the
>first parameter as "_", "common/Contacts" with errors like "KeyError:
>headers" and authorization faliure.
>
>Any help appreciated.
>
>Thanks a lot

First, use dtml-var in stead of call, because call doesn't insert anything 
into your document.

Second, you could also do:

<dtml-with "common.Contacts"><dtml-var asOptions></dtml-with>

--
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
------------------------------------------