source: WAeUP_SRP/trunk/skins/waeup_default/getCreatableItems.py @ 290

Last change on this file since 290 was 290, checked in by joachim, 18 years ago

=add actions changed

File size: 638 bytes
Line 
1## Script (Python) "getCreatableItems"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9##
10items = []
11utool = context.portal_url
12base_url = utool.getBaseUrl()
13
14##if context.getPortalTypeName() == 'Portal':
15##    return items
16
17content_types = context.getSortedContentTypes(allowed=1)
18renderIcon = context.portal_cpsportlets.renderIcon
19
20for ptype in content_types:
21    ptype_id = ptype.getId()
22    items.append({
23        'title': ptype.Title(),
24        'id': ptype_id,
25        'icon_tag': renderIcon(ptype_id, base_url, '')
26    })
27
28return items
Note: See TracBrowser for help on using the repository browser.