handle templates with index names