initialise template view