Add template plugin that extracts the page number from the request.