News list pager

Posted by Community Admin on 03-Aug-2018 06:27

News list pager

All Replies

Posted by Community Admin on 30-May-2011 00:00

I have a  News List with an sf:pager but the paging buttons are not working.

The pager links are being rendered out as:

<a id="mainContent_C003_ctl00_ctl00_ctl00_pager_ctl00_ctl00_cmdNext" onclick="Telerik.Sitefinity.Web.UI.NavigateToPage('mainContent_C003_ctl00_ctl00_ctl00_pager','Next'); return false;" href="../../../../../SFRes/#">Next</a>

Searching all downloaded script resources on the page for "NavigateToPage" is returning no results.

My template for the list is:

 <%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>


<telerik:RadListView ID="NewsList" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
    <LayoutTemplate>
        <sf:ContentBrowseAndEditToolbar ID="MainBrowseAndEditToolbar" runat="server" Mode="Add"></sf:ContentBrowseAndEditToolbar>
        <h2>OMF RESEARCH</h2>
        <ul class="sfnewsList sfnewsListTitlesOnly">
            <asp:PlaceHolder ID="ItemsContainer" runat="server" />
        </ul>
    <img src="/Images/line.png" alt="Line" class="line" />
    </LayoutTemplate>
    <ItemTemplate>
        <li class="sfnewsListItem">
        <h3>
            <sf:DetailsViewHyperLink ID="DetailsViewHyperLink" TextDataField="Title" ToolTipDataField="Description" runat="server" />
            <sf:ContentBrowseAndEditToolbar ID="BrowseAndEditToolbar" runat="server" Mode="Edit,Delete,Unpublish"></sf:ContentBrowseAndEditToolbar>
        </h3>
        </li>
    </ItemTemplate>
</telerik:RadListView>
<sf:Pager id="pager" runat="server"  HideNumeric="true" ShowPrevAndNext="true"></sf:Pager>
<img src="/Images/line.png" alt="Line" class="line" />

I have also recently upgraded to 4.1 SP1 hoping it would fix the issue but hasn't helped.

Thanks

Posted by Community Admin on 30-May-2011 00:00

Hello Kyle,

The issue is still not fixed. I will rise its priority, so we will try to include it in one of the next internal builds.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Jul-2011 00:00

Has this issue been resolved?  I recently upgraded a site to Sitefinity 4.1 SP3 and when I set the news widget on a page and set it to display 5 items per page for the list view, the links generated for the pages do not seem to work. Seems that they are missing the /page/<page #> portion in the link.   For example, here's what is generated for the paging for the news widget on the page -
<div id="Main_C005_newsFrontendList_ctl00_ctl00_pager_ctl00_ctl00_numeric" class="sf_pagerNumeric"><a class="sf_PagerCurrent" href="http://mysite/testupgrade">1</a><a href="http://mysite/testupgrade">2</a><a href="http://mysite/testupgrade">3</a><a href="http://mysite/testupgrade">4</a><a href="http://mysite/testupgrade">5</a><a href="http://mysite/testupgrade">6</a><a href="http://mysite/testupgrade">7</a><a href="http://mysite/testupgrade">8</a><a href="http://mysite/testupgrade">9</a><a href="http://mysite/testupgrade">10</a><a href="http://mysite/testupgrade">...</a></div>

Versus what is generated for the paging for a download list widget
on the page -
<div id="Main_C006_masterListView_ctl00_ctl00_pager_ctl00_ctl00_numeric" class="sf_pagerNumeric"><a class="sf_PagerCurrent" href="http://mysite/testupgrade/">1</a><a href="http://mysite/testupgrade/page/2/">2</a><a href="http://mysite/testupgrade/page/3/">3</a><a href="http://mysite/testupgrade/page/4/">4</a></div>
thanks!

Posted by Community Admin on 01-Aug-2011 00:00

Hello Christine,

The initial issue is that setting the Pager in the news template to show Prev and Next or First and Last does not work - it always returns # as a url and stays at the current page. We have fixed this issue and I am not able to replicate it if you use the page in this format

<sf:Pager id="pager" runat="server"  HideNumeric="true" ShowPrevAndNext="true"></sf:Pager>

Best wishes,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 01-Aug-2011 00:00

Thank you for your reply.  I assume that the modifications you mention below should be made in the news list widget templates?  I have done this and it still does not function correctly.  Paging does not work with these modifications either.  Perhaps I did not apply the changes correctly. If you can give a little more guidance (i.e. where to made the modifications to the sfPager control) it will be much appreciated.  By the way...I am using the out-of-the box news list widget template called "Titles, dates and summaries".

Posted by Community Admin on 02-Aug-2011 00:00

Hello Christine,

You need to change the page declaration in the widget template. You can do this from Widget Templates section or directly using the control designer of the News widget.

Please make sure that you are using the latest build, because the version you use could be an older one that does not have this fix.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 02-Aug-2011 00:00

Hello.  I have modified the widget template and I am using the latest build (that I am aware of) - 4.1 SP3.  However, this problem still persists.  I will submit a support ticket. 

Posted by Community Admin on 27-Sep-2011 00:00

Hi, I see that the ticket has been issued for this thread, so I hope that I am not hijacking the thread.

I have a News List control. I have 5 pages worth of news items listed out.
I go to page 4, for example, and click on one of the news items to see it in its single mode on a
autogenerated page. Then, when I click on the "All news" link at the top to return back to the list
of news items, it takes me back to page 1. I would expect it to take me back to page 4, since I was
on page 4 when I clicked to view the news item. I am sure that needs fixing.

I must admit, I do not have the latest version of Sitefinity, so maybe someone could tell me if that has
been fixed or not in the latest release already.

Many thanks,
Andrei

Posted by Community Admin on 29-Sep-2011 00:00

Hi Andrei,

The issue you are describing is not a bug, because the "All news" link always returns you to the list view without considering the page numbers. This is how it works for now, but as a workaround you can use the browser's back button.

Kind regards,
Petya
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Sep-2011 00:00

Petya,

Thanks for your answer. The issue I have is that I am using Sitefinity in kiosk mode and hence I do not have a back button, unless I programmatically add one to the single news item template. I understand the mindset of Sitefinity since most customers that use Sitefinity use a normal browser. I was just wondering, since it felt a bit unusual. If I were you, I would consider it, in the interest of making Sitefinity more friendly towards all those other markets, that use web technology. I think all it would take is a small "Go Back" link next to the "All news" one.

Many thanks,
Andrei

Posted by Community Admin on 30-Sep-2011 00:00

Hello Andrei,

I apologize for the inconvenience we caused. This is rather missing functionality than a bug. So we will consider your suggestion and try to find a proper decision of this problem. As a workaround, you can try adding such "Go back" link in your "Full news item" widget template (it can be a simple href to simulate the browser's back button behavior) .   

Best wishes,
Petya
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed