Adds the get_page_type method.