Generates a pagination model for binding into templates