modified view_page_type function to render all page types rather than just 1