Add method to get the current page of a pagination.