Updated code to reflect change in add_page view and template