[Zope] Re:API and namespace
Sven Hohage
sven.hohage@zeitspringer.de
Mon, 11 Dec 2000 16:30:02 +0100
Hi Alexander,
I think I've made a mistake.
I thought you are about ZClasses.
My snippet adds two ZClasses (a folder-like and a document).
These Classes are self-defined(take a look at the HowTos or the
Developer-Guide"http://www.zope.org/Documentation/Guides/ZDG").
For you this is sufficient ->
<dtml- call "manage_addFolder (FolderName)">
<dtml-with "_.getitem(FolderName)">
<dtml- call "manage_add (DocumnetName)">
</dtml-with>
Here are some starting-hints:
They are all taken from the Zope Quick Reference
-->manage_addFolder(id, [title, createPublic, createUserF, REQUEST])
Add a new Folder object with id id. If the createPublic
and createUserF parameters are set to
any true value, an index_html and a UserFolder objects
are created respectively in the new folder.
-->manage_addDTMLDocument(id, [title, file, REQUEST, submit])
Add a DTML Document object with the contents of file.
If file is empty, default document text is used.
-->getitem(name,flag)
Lookup a name in the namespace. If the value is callable
and
the flag is true, then the result of calling the value
is returned, otherwise the value is
returned. flag defaults to false.
You find the reference at -->http://zdp.zope.org/
Hope that helps!
Bye