Add a template switch to page function - allows custom templates.