Share via

Custom Pagination in Sharepoint search result webpart

Rajiv Ranjan 21 Reputation points
2021-10-07T09:00:38.047+00:00

I have a SP 2013 Search result webpart, i wanted to update the current pagging view , by default it showing only 1 & 2 with next button.
138428-image.png

It should show at least 6 digit for me for Example (< 1 2 3 4 5 6 >). Can any one help me on this. How can i achieve it.

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. JoyZ 18,131 Reputation points
    2021-10-08T02:50:56.417+00:00

    @Rajiv Ranjan ,

    First, export Search Results Web Part and edit it.

    Number of pages in pagination UI is controlled by two variables in the Search Results web part:

    <property name="MaxPagesBeforeCurrent" type="int">5</property>  
    <property name="MaxPagesAfterCurrent" type="int">5</property>  
    

    Then import the changed web part via site settings>choose web parts under Web Designer Galleries>upload it as shown below:

    138657-image.png

    Then remove the default search result web part, add the customized web part:
    138658-image.png

    You will now get this:

    138688-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.