template out the index