Customize Pager in Search results

Posted by Community Admin on 03-Aug-2018 21:38

Customize Pager in Search results

All Replies

Posted by Community Admin on 08-Feb-2011 00:00

Hi,

I want to customize layout of sitefinity:Pager in search results template.
How can I do this?

Thank you,
Mikhail

Posted by Community Admin on 08-Feb-2011 00:00

Hi Mikhail,

You can open SearchResults control for editing and then choose the template you want to use. From the control designer  you can edit the template directly. SearchResults contains the Page control at the bottom of the control template. You could set LayoutTemplatePath and map the template of the pager

<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
 
<sf:SitefinityHyperLink ID="cmdFirst" runat="server" Text="<%$Resources:Labels, Paging_First %>" />
<sf:SitefinityHyperLink ID="cmdPrev" runat="server" Text="<%$Resources:Labels, Paging_Prev %>" />
<div runat="server" id="numeric" class="sf_pagerNumeric"></div>
<sf:SitefinityHyperLink ID="cmdNext" runat="server" Text="<%$Resources:Labels, Paging_Next %>" />
<sf:SitefinityHyperLink ID="cmdLast" runat="server" Text="<%$Resources:Labels, Paging_Last %>" />


Another option is overriding the css classes that are set over the pager like sf_PagerCurrent

Kind regards,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about 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 10-Feb-2011 00:00

Thanks for your answer, but I have one small issue.

I have added to my template this code:

<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
test1
<sf:SitefinityHyperLink ID="cmdFirst" runat="server" Text="First" />
test2
<sf:SitefinityHyperLink ID="cmdPrev" runat="server" Text="Previous" />
<div runat="server" id="numeric" class="sf_pagerNumeric"></div>

But in HTML result I see this:

<div id="MainContentArea_MainContentPageArea_C001_ctl00_pager">
         
test1
 
test2
 
<div id="MainContentArea_MainContentPageArea_C001_ctl00_pager_ctl00_ctl00_numeric" class="sf_pagerNumeric">
.....
</div>
</div>

How can I resolve this issue?

Thanks,
Mikhail

Posted by Community Admin on 11-Feb-2011 00:00

Btw, if we use these buttons "next", "prev", "first", "last", they  do nothing.

This thread is closed