Jan 14

修改留言频道每行显示留言类别数量 雪

阵风 , 10:07 , 动易 , 评论(0) , 引用(0) , 阅读(230) , Via 本站原创 | |
默认情况下,动易留言频道栏目导航处每行只显示10个留言类别(第一行9个)。有时留言类别名称较短,每行仅显示10个的话行尾空白较多,影响美观。

如何修改每行显示的留言数量呢?

如果是动易2005版、2006版等组件版本,恐怕只能增加自定义标签来实现了,需要替换多处。如果是PowerEasy® SiteWeaver™ CMS(动易 SiteWeaver™ 内容管理系统),那就简单了,只需修改Include/PowerEasy.GuestBook.asp中的函数GetGKindList()即可。该函数代码如下:

引用

'=================================================
'函数名:GetGKindList()
'作  用:横向显示留言类别
'参  数:无
'=================================================
Private Function GetGKindList()
    Dim rsGKind, sqlGKind, strGKind, i
    sqlGKind = "select * from PE_Guestkind order by OrderID"
    Set rsGKind = Conn.Execute(sqlGKind)
    If rsGKind.BOF And rsGKind.EOF Then
        strGKind = "| " & XmlText("Guest", "KindList/Nofound", "没有任何类别")
    Else
        i = 1
        strGKind = "| "
        Do While Not rsGKind.EOF
            strGKind = strGKind & "<a href='index.asp?KindID=" & rsGKind("KindID") & "'>" & rsGKind("KindName") & "</a>"
            strGKind = strGKind & " | "
            i = i + 1
           If i Mod 10 = 0 Then
                strGKind = strGKind & "<br>"
            End If
            rsGKind.MoveNext
        Loop
    End If
    rsGKind.Close
    Set rsGKind = Nothing
    'If GuestBook_IsAssignSort = False Then
        'strGKind = strGKind & "<a href='index.asp?KindID=0'>" & XmlText("xxxxx", "xxxxxx", "不属任何类别") & "</a> |"
    'End If
    GetGKindList = strGKind
End Function

发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]