Re: Plone Content Typ programmatisch erstellen (ArrayField)

Nico Grubert <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
robert rottermann wrote:
> ich würe nicht invokeFactory nutzen, sondern
> portal_types.constructContent (oder so).
> das sähe dann in etwa so aus:
> new_id = portal_types.constructContent ("MyContentType", container, id ..)
> new_obj = container[new_id]
> for feld in alle meine felder:
>   new_obj.setzeFeld(wert ..)

Das ist wirklich leichter als ich dachte:

images = [{'image':'',
            'imagetitle':'bu',
            'imagetext':'mytext'}
           ]

obj.invokeFactory("MyContentType",
                    id=id,
                    title=title,
                    images=images,
                    )

Warum sollte ich invokeFactory nicht mehr nutzen? Wird das demnächst 
nicht mehr unterstützt?


_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.