[Zope-dev] Re: [Zope] DTML methods vs. documents for index_html

Jimmie Houchin jhouchin@texoma.net
Wed, 12 May 1999 11:48:51 -0500


Hello,

I wrote this message last week. I probably should have posted it to this,
the zope-dev list instead of the zope list.

In the Zope 1.11pr1 Windows95, binary install that I use/play with at work
I made the change I list at the end of my message and it worked great to
change the default behaviour of adding a default interface to a folder from
creating a DTMLDocument to creating a DTMLMethod.

Is my understanding in line with the rest of the community?

Jimmie Houchin

At 01:37 PM 5/5/99 -0500, Jimmie Houchin wrote:
>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