##parameters=key=None # $Id: get_faculties_voc.py 280 2006-06-30 06:43:03Z joachim $ """ 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