Sort pages by index