Last change
on this file since 1552 was
372,
checked in by chervol, 18 years ago
|
fixed interfaces
|
-
Property svn:eol-style set to
native
|
File size:
629 bytes
|
Line | |
---|
1 | from Products.CMFCore.utils import getToolByName |
---|
2 | |
---|
3 | from utils import updateMenu |
---|
4 | from config import PROPERTY_SHEET, PROPERTY_FIELD |
---|
5 | |
---|
6 | def 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.