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.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,594 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,571 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JoyZ 18,041 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.