##parameters=key=None 
# $Id: get_faculties_voc.py 182 2005-11-16 23:30:12Z joachim $
"""
Return the faculties as an vocabulary

"""
academics = context.portal_catalog(id = 'academics')[-1].getObject()
items = [i for i in context.filterContents(items=academics.contentValues()) if i.portal_type == 'Faculty']
context.REQUEST.set('items', items)
context.REQUEST.set('key', key)
if not key:
    return [(f.getId(),f.title_or_id(),) for f in items]
return [f.title_or_id() for f in items if f.getId() == key][0]
return [(f.getId(),f.title_or_id()) for f in items if f.getId() == key]

