Moved pagination template to template tags.