[Zope] DTML methods vs. documents for index_html

Jimmie Houchin jhouchin@texoma.net
Wed, 05 May 1999 13:37:24 -0500


Hello,

I am working on my understanding on DTML methods and documents. 
I've read previous posts and the ZDP FAQ and this is my understanding.
Feel free to enlighten my understanding. :)

From Michel in the thread, DTML Method vs Document
At 05:24 PM 3/3/99 -0500, Michel Pelletier <michel@digicool.com> wrote:
>
>This is my take on the situation.  As far as I can tell this is pretty
>deep voodoo.
>
><Snip>...
>
>Both DTML Documents and DTML Methods can hold DTML and content.  The
>difference is subtle.  DTML Methods would be used when the answer to the
>question 'Am I showing some other objects content through me?' is Yes.
>DTML Documents should be used when the answer to the question 'Am I the
>content I want to display?' is Yes.  DTML Methods have the advantage
>that they don't have any properties, and their perspective of aquisition
>is from their containing folders point of view.  DTML Documents have
>properties which may interfere with aquisition you'd want to do, and
>aquisition is from their own point of view, which may not be what you
>want.

By the way I find this to be a most excellent explanation.

For the default public interface of a folder, it seems to me that it should
be a DTMLMethod. In browsing a default install of Zope 1.11.0pr1 the top
level folder's default interface is a DTMLMethod, likewise the QuickStart.

When you add a Folder and check Create Public Interface and then click add
it adds a DTMLDocument not DTMLMethod. Is this the currently desired
effect? Or is this legacy functionality due to pre 1.10.x and DTMLMethods?

If so would the following be a reasonable way to handle the current
philosophy?
(According to my understanding.)

In /python/OFS/Folder.py I see line 119 which says:

    if createPublic: i.manage_addDTMLDocument(id='index_html',title='')

To change the default is all I need to do is change it to?

    if createPublic: i.manage_addDTMLMethod(id='index_html',title='')

Thanks,

Jimmie Houchin