Last change
on this file since 3296 was
3296,
checked in by fenix, 12 years ago
|
Load Products.CacheSetup?-1.2.1 into vendor/Products.CacheSetup?/current.
|
-
Property svn:eol-style set to
native
|
File size:
767 bytes
|
Line | |
---|
1 | ## Script (Python) "getFolderButtons" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters=actions |
---|
8 | ##title=Get Folder Button Actions |
---|
9 | |
---|
10 | # a fix for the lack of folder button actions in the |
---|
11 | # global actions variable in Plone 3 |
---|
12 | # FIXME: we need an updated folder contents template for CacheFu. |
---|
13 | |
---|
14 | from Products.CMFCore.utils import getToolByName |
---|
15 | from Products.CacheSetup.config import PLONE25 |
---|
16 | |
---|
17 | if actions.get('folder_buttons', None) is None and not PLONE25: |
---|
18 | portal_actions = getToolByName(context, 'portal_actions') |
---|
19 | button_actions = portal_actions.listActionInfos(object=context, categories=('folder_buttons', )) |
---|
20 | actions.update({'folder_buttons': button_actions}) |
---|
21 | |
---|
22 | return actions |
---|
Note: See
TracBrowser
for help on using the repository browser.