changed the getTypes event to getTemplates