Tidy pagecode order
Select prev/next IDs