[Zope] Possible Insight, DTML Methods and Documents...

Brian Lloyd Brian@digicool.com
Thu, 23 Sep 1999 10:25:35 -0400


> Hi all,
> thought I'd share this 'insight' - I could be wrong here 
> though, so YMMV...
> 
> I saw Loren Staffords' "Breadcrumbs How-to" at the new Zope
> community site, http://www.zope.org/Members/lstaffor/Breadcrumbs
> 
> and realised that DTML methods are meant to be used as 
> 'fragments' of a
> document, whilst DTML documents 'pull everything together' 
> into a coherent
> web page.

That's a very good way to put it. The (perhaps not very clear)
way that we've tried to explain this is that:

  o a DTML Document is *content*, and its context
    (its idea of 'self') is itself.

  o DTML Methods are *methods* that operate
    on their container. A DTML Method's idea
    of 'self' is its container.

So a DTML Document is logically a "content" object, that may
use DTML Methods or other objects to build itself using elements
of the environment where it lives.


> 
> If I'm right, I think that the default DTML you get when you 
> create a DTML
> method isn't that apt. I don't think that it should include the
> standard_html_header and _footer variables, as it's a bit misleading.

That's a good point. The default DTML for DTML Methods is leftover
from before DTML objects were split to make the distinction between
content and method objects. What do you think would be good default
content for a DTML Method? I suppose one answer is that it should
just be empty, but I think that it's easier for those new to Zope 
when they see *some* kind of default rather than being presented 
with a totally blank slate and no direction at all.

In any case, could you post this concern to the Collector to make
sure that it doesn't speed off in the current of list traffic?


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com