[Zope] Programmatically: zclasses and images

brocken22@gmx.de brocken22@gmx.de
Wed, 11 Oct 2000 12:01:00 +0200 (MEST)


Hallo,
I've got two problems cutting my nerves:
The site-structure is organized in a way that zclasses can be added
programmatically(the user decides by clicking on a tree-list where to add the
classes)
The 1. problem is that I can't manage to pass the URL of the selected
object to add the zclass in the requested place.
Therefore I'm not using one script for adding the instances, but every
zclass is holding the constructormethod(you're clicking on the tree and the
selected zclass is responding with the addFormular and later with the
addConstructor).
This way is working.I'm not very happy about it because every zclass is
created with methods that I think can be avoided.
My biggest problem is that I can't manage to add images in the new zclass.
That's the script:
<dtml- with "manage_addProduct['Zzzz']">
   <dtml-call "ZZZsite_add(_.None, _, NoRedir=1)">
   <dtml-call "manage_addImage(pictureName,picture)">
</dtml-with>

This is a zclassMethod and the formMethod(also inside the zclass)passes
the 'picture' and 'picturename' variables!
The ZZZsite_add method is the usual-one.
I think it's an acquisition problem. 

-- 
Sent through GMX FreeMail - http://www.gmx.net