Convert index page in to template