Implemented the page type query