改进系统函数 GetArticleList(2月1日更新)
使用函数 GetArticleList 显示文章标题等信息时,如果采用表格式或分多列显示,有时会有问题。例如,共21篇文章的标题信息,分4列显示,结果代码少了3对<td>,造成显示效果上的瑕疵。
以PowerEasy® SiteWeaver™ CMS 6.5 Build 0128为例,修改Include/PowerEasy.Article.asp,将Function GetArticleList中的如下代码
If ShowType = 2 Or Cols > 1 Then
strInfoList = strInfoList & "</tr></table>"
替换为
If ShowType = 2 Or Cols > 1 Then
ZZF_remainder=Cols-(iCount Mod Cols)
If ZZF_remainder<Cols
If iCount Mod 2 = 0 Then
CssName = CssName1
Else
CssName = CssName2
End If
Do while ZZF_remainder>0
strInfoList = strInfoList & "<td valign='top' class='" & CssName & "'> </td>"
ZZF_remainder=ZZF_remainder-1
Loop
End If
strInfoList = strInfoList & "</tr></table>"
当然,要在前面补充定义变量 ZZF_remainder。
昨天写本文时,忘了考虑ZZF_remainder等于Cols的情况,导致求余为零时出错,刚才又添加了判断
If ZZF_remainder<Cols
******************
End If
(更新于2008-02-01 17:34)。