Handle our own paging and pass that to templates to make the template
authors job more straightforward

Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>