[Product-Developers] finishing a product

Hedley Roos hedleyroos at gmail.com
Mon Apr 7 18:50:12 UTC 2008


>  The main things I still need to do are:
>  - Hook an email script into this, so that publishing an object fires off a
> notification via email.  I have written an email script, but I don't know
> where to put it or how to call it from my product.
>  - I've been told that I should use an "event handler" for this, which would
> require a registration in configure.zcml, but my attempts to create one (and
> place it at the root of the product directory) result in errors:
>  http://deesto.pastebin.com/f4d16e1bd

Go to portal_workflow in the ZMI. I assume your content type uses
Plone Workflow. Contents tab, click plone_workflow. Now click the
Scripts tab. Add a new Python Script. This script can send the mail
itself or call other methods.

Now click the Transitions tab, click the 'publish' link. You can
select your script on this screen. It can run before or after the
transition.

>  - I would like to modify the Folder-ish type to allow a single
> Collection/Topic/Smart Folder object to be created within it (or to create
> one automatically), and to make this the default view for the folder-ish
> object.  I can use "allowed_content_types" and add "Topic" to the list, but
> how to restrict this to just one of these objects, and to allow Topic to be
> used as a default view?
>

It sounds as though you have subclassed BaseFolder to create your own
folderish type. Set allowed_content_types to = ('Topic',) in the class
declaration. Restart. Reinstall. It should work.




More information about the Product-Developers mailing list