added function to allow rendering of a custom page, rather than the request page