[Zope] How to use the manage_add - methods

Chris McDonough chrism@digicool.com
Thu, 16 Nov 2000 15:21:53 -0500


----- Original Message -----
From: "Espen Sorbye Frederiksen" <ceeesf@cee.hw.ac.uk>
To: <zope@zope.org>
Sent: Thursday, November 16, 2000 2:14 PM
Subject: [Zope] How to use the manage_add - methods


> I am a very novice zope/python user that needs to become an expert as soon
> as possible, since my whole dissertaion is based on Zope/Python.
> I have read all documentation availible on the zope.org site but can't
> find the answer to the following...
>
> 1. To run python scripts written as dtml methods. Do I simply use
> dtml-call from another dtml document/method?

Yes... but you need to pass in the namespace object to call the method if
you call it explicitly with parameters:

<dtml-call anothermethod>

or

<dtml-call "anothermethod(_.None, _)">

Are equivalent.  See the "namespace howto" on Zope.org and the "advanced
dtml" howto.  See also the Zope book (linked from the front page of
Zope.org).

> 2. To create folders, mthods etc in the code. I have found some functions
> manage_addDTMLMethod, manage_addFolder, but how do I use them?

I believe this is also covered in the Zope book.

> 3. I need to make a site that allows users to register ( i.e. to generate
> user folder with some standard documents in them). Anyone have hints
> regarding this? (or in fact a whole application I can use?)

A user folder isn't really a folder in the sense that Folders are folders.
:-)  It usually does not contain anything but users.  One strategy for doing
what you wish is to create another container which contains subfolders, one
for each user, where they can store documents.  An example of such a pattern
is the "PTK". (portal toolkit)

>
> I appreciate any kind of contribution,
>
> Espen
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>