Sort list of templates.