[Zope-CMF] creating factory methods for newly created portal types

Al-Muthairi, Abdullah Abdullah.Al-Muthairi@INTP.COM
Wed, 7 Aug 2002 15:54:47 -0700


> Hi again
> 	i guess i confused everyone with my question so I'll rephrase my
> problem in another simpler way.
> 
> 	i want to create a new factory method for a newly created portal
> type. I created the new type by copying the "Folder" portal type then
> renaming it. I want to avoid using products.
> So i took the "manage_addPortalFolder" factory method from the
> PortalFolder file and put it alone in a new file and made this my factory
> method. But it did not work.
> This is the factory method  i copied
> 
> import PortalFolder  
> 
> def manage_addPortalAppDoc(self, id, title='', REQUEST=None):
>         """Add a new PortalAppDoc object with id *id*.
>         """
>         ob=PortalFolder(id, title)
>         self._setObject(id, ob)
>         if REQUEST is not None:
>             return self.folder_contents( # XXX: ick!
>                 self, REQUEST, portal_status_message="AppDoc added") 
> 
> 	What should i do to create a valid factory method for my newly
> created type without using products?
> And thank you for your time
> 
The information contained in this email message may be privileged and is
confidential information intended only for the use of the recipient or any
employee or agent responsible for delivering it to the intended recipient.
Any unauthorized use, distribution or copying of this information is
strictly prohibited and may be unlawful.  If you have received this
communication in error, please notify the sender immediately and destroy the
original message and all attachments from your electronic files.