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

Joerg Wittenberger Joerg Wittenberger <Joerg.Wittenberger@pobox.com>
Mon, 20 Sep 1999 13:40:29 +0200 (CEST)


Hi folks,

When reading zope examples I came accross a lot of calls to document
templates, which use "_.None" as the first parameter.

From the docs I understand that the first parameter should usually be
the containing object, i. e., for a dtml method the folder it is found
in.  I'd expect the latter to work for me.  But whatever I do I end up
with some ununerstandable error message.

The problem:

I have a folder hirarchy like that:

common/Contacts
docs

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

/Jerry

-- 
        You can have it done fast,
        you can have it done cheap,
        and you can have it done well.
        --- But you can only have two of those at once.