Remove PostPager only in HomePage

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Oct 14, 2015 at 7:09 PM
Hi
There is solution not invasive for remove postpager only in Home?

Can you help me?
Thanks
Fabry
Oct 14, 2015 at 9:01 PM
This is slightly invasive, but should work for your version of BlogEngine.
In folder User controls amend PostList.ascx as follows.

For typical PostList control:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PostList.ascx.cs" EnableViewState="false" Inherits="UserControls.PostList" %>
<div runat="server" id="posts" class="posts" />

<div id="postPaging" style="display: none">
  <a runat="server" id="hlPrev" style="float:left">&lt;&lt; <%=Resources.labels.previousPosts %></a>
  <a runat="server" id="hlNext" style="float:right"><%=Resources.labels.nextPosts %> &gt;&gt;</a>
</div>

<div style="clear:both; display:block">
//*************** Amendment - Wrap pager in if block ********************************
    <%if (!BlogEngine.Core.Utils.IsCurrentRequestForHomepage)
        { %>
            <blog:PostPager ID="pager1" runat="server"></blog:PostPager>
    <%} %>
</div>
Oct 14, 2015 at 9:27 PM
Thanks Andy,
Now Work..

YOU ARE THE BEST!!!