Back to index

plone3  3.1.7
Variables
getAddableTypesInMenu Namespace Reference

Variables

string INTERFACE = "Products.CMFPlone.interfaces.ConstrainTypes.IConstrainTypes"
 Script (Python) "getAddableTypesInMenu" bind container=container bind context=context bind namespace= bind script=script bind subpath=traverse_subpath parameters=allowedTypes title=Return a list of the content type ftis filtered by getImmediatelyAddableTypes(), if available.
tuple itool = getToolByName(context, 'portal_interface')
tuple mtool = getToolByName(context, 'portal_membership')
 translate = context.translate
tuple plone_view = context.restrictedTraverse('@@plone')
tuple folder = plone_view.getCurrentFolder()
list result = [(translate(ctype.Title()), ctype) for ctype in allowedTypes]
tuple immediateIds = folder.getImmediatelyAddableTypes()

Variable Documentation

tuple getAddableTypesInMenu.folder = plone_view.getCurrentFolder()

Definition at line 21 of file getAddableTypesInMenu.py.

tuple getAddableTypesInMenu.immediateIds = folder.getImmediatelyAddableTypes()

Definition at line 30 of file getAddableTypesInMenu.py.

string getAddableTypesInMenu.INTERFACE = "Products.CMFPlone.interfaces.ConstrainTypes.IConstrainTypes"

Script (Python) "getAddableTypesInMenu" bind container=container bind context=context bind namespace= bind script=script bind subpath=traverse_subpath parameters=allowedTypes title=Return a list of the content type ftis filtered by getImmediatelyAddableTypes(), if available.

Definition at line 13 of file getAddableTypesInMenu.py.

tuple getAddableTypesInMenu.itool = getToolByName(context, 'portal_interface')

Definition at line 16 of file getAddableTypesInMenu.py.

tuple getAddableTypesInMenu.mtool = getToolByName(context, 'portal_membership')

Definition at line 17 of file getAddableTypesInMenu.py.

tuple getAddableTypesInMenu.plone_view = context.restrictedTraverse('@@plone')

Definition at line 20 of file getAddableTypesInMenu.py.

list getAddableTypesInMenu.result = [(translate(ctype.Title()), ctype) for ctype in allowedTypes]

Definition at line 24 of file getAddableTypesInMenu.py.

getAddableTypesInMenu.translate = context.translate

Definition at line 18 of file getAddableTypesInMenu.py.