1、将UI\Controls\RecentComments.ascx和.cs复制到AggSute\;

2、在AggSite\Template.ascx相关位置添加下面两行:
<%@ Register TagPrefix="uc1" TagName="RecentComments" Src="RecentComments.ascx" %>
<uc1:RecentComments ></uc1:RecentComments>

3、把AggSite\RecentComments.ascx中的
namespace Dottext.Web.UI.Controls
改为:
namespace Dottext.Web.AggSite

Inherits="Dottext.Web.UI.RecentComment"
改为:
Inherits="Dottext.Web.AggSite.RecentComments"

4、把AggSite\RecentComments.ascx.cs中

BindList()函数
query.ItemCount=Config.CurrentBlog().ItemCount;
改为:
query.ItemCount=5; //显示评论的数目

OnLoad(EventArgs e)函数注释掉下面语句:
this.Visible=Dottext.Web.UI.Globals.CheckContorVisible("RecentComments");
string url=Config.CurrentBlog().FullyQualifiedUrl;
RSSHyperlink1.NavigateUrl=url+"RecentCommentsRSS.aspx";

5、修改样式,然后重新编译DotText。OK!

相关文章:

  • 2022-01-07
  • 2021-06-20
  • 2022-12-23
  • 2021-07-15
  • 2021-10-23
  • 2021-08-06
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2021-05-23
  • 2021-12-24
  • 2021-10-21
  • 2021-12-06
  • 2021-12-15
  • 2021-07-03
相关资源
相似解决方案