Sometimes clients come up with crazy requests “I can not go back to first page, this pagination is not good enough” – but this one was reasonable and SharePoint 2013 search is so easy customizable, lets take it as an exercise!
Everything is a Display Template
As the caption says, you can change almost every design aspect in SharePoint 2013 Search by changing a html file (or a .js file if you are on Foundation) – this includes the general rendering of the search results and with it the pagination.
So let’s try to change it to the desired behavior - of course I know that you can remove the #s or click on the search loop again.
Control_SearchResults.html
Open the file (MasterPage gallery > Display Templates > Search) and go to line 248. Then paste the following in – or download the whole template: Control_SearchResults.
if (pagingInfo.length == 8 && pagingInfo[0].startItem > 31)
{
_#-->
Share this post
Twitter
Facebook
LinkedIn
Email