added some functionality to view and template to display new url conditionally