Adding extra param check to prettyurl generation with pagination