Adding a new view method to a portal type
Thu, Jul 27, 2006,
100 Words
While this method is superceeded by GenericSetup, it's usefull enough that I place it here.
ptypes = portal.portal_types
psite = getattr(ptypes, 'Plone Site')
view_methods = psite.view_methods
vm = list(view_methods) + ['main_frontpage']
psite.manage_changeProperties(view_methods=vm)
Previous: Using z3 style events