pagination placed in a separate template