Folders, one more time!!
Hi, There is a lot of questions about Folders on the list in our days..... I got one too... ;^) I would like to make a SpecialFolder, with its own methods and objects. I tried doing it by using products and ZFactories, but I do not manage to insert my special Folders as a normal Folder in the hierarchy Zope.. Is there a simple way to do it, I mean having my SpecialFolder in the Add list, and when adding it, inserting it in the zope hierarchy as a Folder which can be managed, with object by default. (I hope I have been clear.... but not sure)! A great thanks to any people who would be able to help me....... Pierre PS: can I find somewhere the list of DTML functions (as manage_addProduct and such functions...)
Pierre Rougier wrote:
Hi, There is a lot of questions about Folders on the list in our days..... I got one too... ;^) I would like to make a SpecialFolder, with its own methods and objects. I tried doing it by using products and ZFactories, but I do not manage to insert my special Folders as a normal Folder in the hierarchy Zope..
Is there a simple way to do it, I mean having my SpecialFolder in the Add list, and when adding it, inserting it in the zope hierarchy as a Folder which can be managed, with object by default.
You'd best make a ZClass, subclassing from Folder. You can add any (well many) other behaviour stuff to it you like. In Zope hierarchy it will behave exactly like a normal folder and it will be added to the product Add list.
(I hope I have been clear.... but not sure)!
Perhaps... If my answer was on target, you were ;-)
Pierre
PS: can I find somewhere the list of DTML functions (as manage_addProduct and such functions...)
see the Zope Quick Reference @ http://zdp.zope.org/projects/zqr Rik
hi,
You'd best make a ZClass, subclassing from Folder. You can add any >(well many) other behaviour stuff to it you like. In Zope hierarchy it will behave exactly like a normal folder and it will be added to the product Add list.
Well, thanks Rik, it helps.... well... I manage to add the specialFolder, but the problem is that I can't see the content of my SpecialFolder when I go in, I mean I defined an index_html and an Object in my ZClass, but I can not see it when I instanciate the ZClass! Is there something to change somewhere in order to make it appear??? and one more thing: I would like to put the Folder icon to my SpecialFolder: do u know how I can do it?? anyway, thank you for your help!
Pierre Rougier wrote:
hi,
You'd best make a ZClass, subclassing from Folder. You can add any >(well many) other behaviour stuff to it you like. In Zope hierarchy it will behave exactly like a normal folder and it will be added to the product Add list.
Well, thanks Rik, it helps.... well... I manage to add the specialFolder, but the problem is that I can't see the content of my SpecialFolder when I go in, I mean I defined an index_html and an Object in my ZClass, but I can not see it when I instanciate the ZClass! Is there something to change somewhere in order to make it appear???
What do you mean by I can't see it? The ZClass instance won't show you the contents of the ZClass definition, but that doesn't mean they can't be reached. If you defined an index_html, have you tried using the view method of the folder. By default it shows the index_html of the ZClass. If you want the object to show up you'll have to call it from one of the (DTML or other) methods inside the folder.
and one more thing: I would like to put the Folder icon to my SpecialFolder: do u know how I can do it??
Yep. Probably the easiest way is to download the folder icon and then specify it under the ZClass Basic tab, where there is an icon option. Rik
participants (2)
-
Pierre Rougier -
Rik Hoekstra