More in this section

Forums / Developing with Sitefinity / functionality in newsview paging

functionality in newsview paging

2 posts, 0 answered
  1. Phani
    Phani avatar
    7 posts
    22 Apr 2009
    05 Oct 2009
    Link to this post
    Currently the newsview does paging based on the "itemsperpage" property.All the page links comes between the next and previous button.for example if i have 10 pages i would see a previous button, 1-10 pages links and a next button.But i want to limit the number of page links between the next and the previous buttons that i would like to show previous button then 1 to 5 page links and a next button and once the user goes to the 5th page the the paging links should be from 5 to 9. Can this be achieved.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    05 Oct 2009
    Link to this post
    Hello Phani,

    Thank you for using our services.

    The Pager control has a property called PagesRange. This property's default value is 10 and the pages would show the first 10 pages, if you have more than 10 pages, and so on. In order to set this to the desired number you will have to use the external template for the News View and set this property to the <telerik:Pager> control. If you do not have the external templates, or you need more information on external templates, please take a look at this article. Then modify the pager in the ~/Sitefinity/ControlTemplates/News/ListPageMaster.ascx as bellow:
    <telerik:Pager ID="pager1" runat="server" PagesRange="5"

    This should do what you are looking for.

    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered