## Script (Python) "getCreatableItems"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
items = []
utool = context.portal_url
base_url = utool.getBaseUrl()
#return context.getPortalTypeName()

if context.getPortalTypeName() == 'Portal':
    return items

content_types = context.getSortedContentTypes(allowed=1)
renderIcon = context.portal_cpsportlets.renderIcon

for ptype in content_types:
    ptype_id = ptype.getId()
    items.append({
        'title': ptype.Title(),
        'id': ptype_id,
        'icon_tag': renderIcon(ptype_id, base_url, '')
    })

return items
