Personal tools
You are here: Home Weblog Archive 2006 October 07 Creating zope content
Document Actions
  • Send this page to somebody
  • Print this page
  • Add Bookmarklet

Creating zope content

by tibi last modified 2007-02-06 13:20
Filed Under:

I had a need to create new external methods on install of a product. So, even if technique is old and well know to any Zope 2 old-timer, I'm placing this here for my own reference.

def install(portal):
    portal.manage_addProduct['ExternalMethod'].manage_addExternalMethod(
        id = 'emailMe',
        title='emailMe',
        module='MyProduct.emailMe',
        function='emailMe')

The code needs to interact with a legacy module (renamed here emailMe). The idea is that manage_addProduct returns a dictionary of factories and manage_addExternalMethod is the factory method defined in the ExternalMethod module. Most of the old style Zope content can be added this way.

Weblog
Atom
RDF
RSS 2.0
Powered by Quills
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: