Domas Monkus wrote:
Hi,
I have a rather simple question - what I want to do is automatically
create a mailing list once an object (a folderish object) of my
content type is created. Any suggestions as to how I should do it?
What properties do I need to specify?
listen mailing lists are not based on Archetypes, but they are still
ultimately just regular Plone content, so you'd use folder.invokeFactory (or
_createObjectByType from Products.CMFPlone.utils, if you need to route around
permission issues) to create one.
you can see an example of a mailing list being created programmatically in the
opencore codebase:
http://trac.openplans.org/openplans/browser/opencore/trunk/opencore/listen/events.py#L65
the listen_featurelet_installed event handler in that module comes up w/ an
id, title, and address, makes sure a list w/ the given address doesn't already
exist, then it creates the list and does some post-creation setup (including
subscribing all the members of the project where the list was created).
-r
--
Archive:
http://www.openplans.org/projects/listen/lists/listen-dev/archive/2008/12/1229623296698
To unsubscribe send an email with subject "unsubscribe" to
[email protected]. Please contact [email protected]
for questions.