Re: [Zope] Prepopolate miniportal

2007-11-28 Thread Dieter Maurer
Francesco Margutti wrote at 2007-11-28 14:09 +0100:
> ...
>But i want insert in this structure a already existing template that is 
>in the folder of the script.
>How can i do this??

You use methods of "OFS.CopySupport" to copy and paste the object:
"manage_copyObjects" and "manage_pasteObjects".



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Prepopolate miniportal

2007-11-28 Thread Francesco Margutti

Hi.
I want to create a new Miniportal object that is pre-populated with a 
variety of content objects.
I have just create a product for this but my problem is yhe insert of 
contents.

I have create my structur with:

--
   self.invokeFactory(id='prova', type_name='Folder')
   obj=getattr(self,'prova')
   obj.invokeFactory(id='newsitem_1', type_name='News Item')
   obj.invokeFactory(id='document_1', type_name='Document')
   documento=getattr(obj, 'document_1')
   *documento.edit('html', 'This is a new Page')*
   obj.invokeFactory(id='image_1', type_name='Image')
   obj.invokeFactory(id='cartella1', type_name='Folder')
   folder10=getattr(obj, 'cartella1')
   folder10.invokeFactory(id='sottocartella1', type_name='Folder')
---

But i want insert in this structure a already existing template that is 
in the folder of the script.
How can i do this?? What does parameters must i use in the method 
"invokeFactory".

Thank you very much.

Francesco

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )