source: products/qPloneDropDownMenu/trunk/setuphandlers.py @ 1140

Last change on this file since 1140 was 372, checked in by chervol, 14 years ago

fixed interfaces

  • Property svn:eol-style set to native
File size: 629 bytes
Line 
1from Products.CMFCore.utils import getToolByName
2
3from utils import updateMenu
4from config import PROPERTY_SHEET, PROPERTY_FIELD
5
6def installMenu(context):
7
8    if context.readDataFile('qplonedropdownmenu_various.txt') is None:
9        return
10
11    site = context.getSite()
12    portal_props = getToolByName(site, 'portal_properties')
13
14    # skip adding property if it already exists
15    prop_sheet = getattr(portal_props.aq_base, PROPERTY_SHEET, None)
16    if prop_sheet is not None:
17        prop_field = getattr(prop_sheet.aq_base, PROPERTY_FIELD, None)
18        if prop_field is not None:
19            return
20
21    updateMenu(site)
Note: See TracBrowser for help on using the repository browser.