Make pagination example work for multiple controllers

This might come in handy when inheriting the paging functionality in multiple controllers.