Generalized way of getting next page link