added search, perpage, and offset to template for search results