## Script (Python) "getTypeActions"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
types = context.portal_types.listTypeInfo()

actionsdict = {}

for content_type in types:
  meta_type = content_type.content_meta_type
  actionsdict[meta_type]= {}

  try:
    actionsdict[meta_type]['view'] = content_type.getActionById('view')
  except:
    actionsdict[meta_type]['view'] = None

  if not actionsdict[meta_type]['view']:
    if meta_type == 'Portal Folder' or meta_type == 'Portal BTree Folder':
      actionsdict[meta_type]['view'] = 'folder_contents'

  try:
    actionsdict[meta_type]['edit'] = content_type.getActionById('edit')
  except:
    actionsdict[meta_type]['edit'] = None

  actionsdict[meta_type]['icon'] = content_type.content_icon

return actionsdict
