building template for instance pages