##parameters=key=None # $Id: get_faculties_voc.py 265 2006-06-23 08:58:00Z lregebro $ """ Return the faculties as an vocabulary """ if key is None: res = context.portal_catalog.search({'meta_type': "Faculty"}) return [(d.getId,d.Title,) for d in res] dep = context.portal_catalog.search({'meta_type': "Faculty", 'id': key})[-1] return dep.Title