page_snippet for reusing paging code