##parameters=key=None # $Id: getCosCombinedVoc.py 2814 2007-11-28 12:26:51Z henrik $ """ Return the combined courses as an vocabulary """ if key is None: l = [] for k,v in context.portal_vocabularies.cos.items(): l += (k,v), for k,v in context.portal_vocabularies.cos_cest.items(): if k: l += (k,v), return l for voc in (context.portal_vocabularies.cos, context.portal_vocabularies.cos_cest, context.portal_vocabularies.cos_sandwich): title = voc.get(key,None) if title is not None: return title else: raise KeyError