Add index with template