修改CCS首页显示的论坛帖子和Blog日志的数量
CCS中大量应用了自定义控件进行信息的显示,只需要通过简单的修改aspx标签,就可以改变显示效果,不需要重新编译工程。默认情况下,CCS1.1在首页显示20条论坛帖子和5条blog日志,Blog条数少了点,论坛帖子太多了(符合国人特点),下面我们看看如何修改:
打开\src\web\default.aspx,找到
<CS:Content id="BodyContentRegion" runat="server"> <CSD:LatestForumPosts Count="20" RefreshSeconds="60" DefaultIconSrc="~/images/Forums/icon.gif" TitleLength="-1" ForumID="-1" ShowTitleOnly="false" runat="server" ViewMode = "RecentPosts"/> <Blog:AggregatePostList runat ="Server" PageSize="5"/> <CSD:LatestForumPosts Count="10" RefreshSeconds="1800" DefaultIconSrc="~/images/Forums/icon.gif" TitleLength="-1" ForumID="-1" ShowTitleOnly="false" runat="server" ViewMode = "Valued"/> <CSD:LatestForumPosts Count="10" RefreshSeconds="3600" DefaultIconSrc="~/images/Forums/icon.gif" TitleLength="-1" ForumID="-1" ShowTitleOnly="false" runat="server" ViewMode = "TodayTop10Threads"/> <CS:WhoIsOnline runat="server" /> CS:Content>
修改其中的<Blog:AggregatePostList runat ="Server" PageSize="5"/>中的PageSize为你想要的blog条数即可,如设置为15条。并且调整了帖子和blog的位置,最后修改为:
适用于CCS1.1<CS:Content id="BodyContentRegion" runat="server"> <Blog:AggregatePostList runat ="Server" PageSize="15"/> <CSD:LatestForumPosts Count="20" RefreshSeconds="60" DefaultIconSrc="~/images/Forums/icon.gif" TitleLength="-1" ForumID="-1" ShowTitleOnly="false" runat="server" ViewMode = "RecentPosts"/> <CSD:LatestForumPosts Count="10" RefreshSeconds="1800" DefaultIconSrc="~/images/Forums/icon.gif" TitleLength="-1" ForumID="-1" ShowTitleOnly="false" runat="server" ViewMode = "Valued"/> <CSD:LatestForumPosts Count="10" RefreshSeconds="3600" DefaultIconSrc="~/images/Forums/icon.gif" TitleLength="-1" ForumID="-1" ShowTitleOnly="false" runat="server" ViewMode = "TodayTop10Threads"/> <CS:WhoIsOnline runat="server" /> CS:Content>
All the posts in this blog are provided "AS IS" with no warranties, and confer no rights. Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 2.5 China Mainland License.