query page layout implementation