Adding a new view method to a portal type

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)

Comments