[ZDP] FAQ 0.2 - Builtin Products

Martijn Faassen M.Faassen@vet.uu.nl
Tue, 09 Mar 1999 19:37:39 +0100

Zope FAQ 0.2 - Builtin Products

* What is the difference between a DTML Method and a DTML Document?

    A DTML Method is what used to be just a Document in pre 1.10
    releases. DTML Methods are not objects, they are methods. If you
    have a folder called 'foo', and it contained a DTML Method called
    'bar', then 'bar' is a method of 'foo'. 'foo' doesn't contain the
    object 'bar', it has the method 'bar' bound to it. What this means
    is that from 'bar''s point of view, 'self' is a Folder object, and
    any properties it sees are properties of 'foo', not itself.

    DTML Documents are Zope Objects. Their idea of 'self' is
    themselves.  They are contained in folders, but are not methods
    bound to that folder, they are instances of
    'DTMLDocument.DTMLDocument'. They can manage their own Properties
    (because they inherit 'PropertyManager.PropertyManager').

    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.

* What is a (Principia) Draft?

    A Principia Draft is a special copy of any Zope object that is
    invisible to visitors of your site. You can make changes to this
    copy, and grant access to outsiders to view your changes (or work
    along with you). When all changes are done, you can approve all
    the changes, or discard them. Approving will make the changes
    permanent and visible to your audience. However, currently Drafts
    can appear to be broken.

    To add a draft, choose Principia Draft from the popup menu and
    click 'Add'. Next, you will have to supply an ID for the Draft,
    and specify on what base object you are going to work. Clicking
    'Add' in this screen will create the Draft for you. Next, you will
    have to specify who will have access to the Draft.

    Here the problem starts, because of the way Drafts are
    managed. First, a Draft doesn't acquire any users from its parent,
    so you will have to add anyone who has to have access explicitly,
    even if they have already been access to a parent Folder. But the
    biggest problem is that you can't reach the UserFolder and
    Approval screens via the management screens. This will make a
    Draft a bit harder to use, but it still is workable.

    This second problem is caused by convention changes in the Folder
    object (or the ObjectManager class really, used by Folder). I
    think that Folder objects *used* to call 'title_and_id' on a
    object when displaying it in it's management screen, but the
    current release of Zope constructs the id and title of an object
    by using its id and title separately.  Principia Drafts made use
    of the call to 'title_and_id' to insert links to its UserFolder
    and Approval management screens. As this now doesn't happen
    anymore, you will have to type in the URLs to the screens

    You can reach the screens calling the Draft object's
    'users__draft__.manage_main' and 'manage_approve__draft__'
    methods. The URLS are::




    So, the next step is typing in the URL to the Draft's UserFolder
    management screen, and adding all users that should have access to
    the Draft. These users can now edit and view all changes made to
    this Draft.

    When done, you go to the 'manage_approve__draft__' management
    screen, and approve, or discard the changes.