以下是引用 科汛官方在2013/5/4 12:26:32的发言:
效果:
在内容页里使用标签:{$GetArticlePageList}调用:
实现代码:
以下内容只有回复后才可以浏览
打开ks_cls/modellabel/article.asp
'================================文章模型开始================================
case "getarticlepagelist" '分页导航
dim URL,PN,PageTitle:PageTitle=GetNodeText("pagetitle")
if Not KS.IsNul(PageTitle) Then
echo "<div class=""pagenavigation"">" &vbcrlf
echo " <h2>分页导航</h2>" &vbcrlf
echo " <ul>" &vbcrlf
PageTitle=split(PageTitle,"§")
Dim ShowUrl:ShowUrl=KS.LoadInfoUrl(ModelID,Tid,"",ItemId)
For PN=0 to Ubound(split(Node.SelectSingleNode("@articlecontent").text,"[NextPage]"))
If KS.C_S(ModelID,7)<>1 and KS.C_S(ModelID,7)<>2 Then '动态
If KS.C_S(ModelID,48)=0 Then
URL="?m=" & ModelID & "&d="& ItemID & "&p="&(PN+1)
ElseIf KS.C_S(ModelID,48)=2 Then
URL=KS.Setting(3) & GCls.StaticPreContent & "-" & ItemID & "-" & ModelID & "-" & (PN+1) & GCls.StaticExtension
Else
URL=KS.Setting(3) & "?" & GCls.StaticPreContent & "-" & ItemID & "-" & ModelID & "-" & (PN+1) & GCls.StaticExtension
End If
else '生成静态
dim sFname:sFname = Trim(Node.SelectSingleNode("@fname").text)
dim FExt:FExt = Mid(sFname, InStrRev(sFname, ".")) '分离出扩展名
dim FName:Fname = Replace(sFname, FExt, "") '分离出文件名 如 2005/9-10/1254ddd
If PN=0 Then
URL = ShowUrl & sFname
Else
URL =ShowUrl & Fname & "_" & (PN+1) & FExt
End If
end if
echo "<li><a href=""" & url & """>第" & (PN+1) & "页:" & PageTitle(PN) & "</a></li>" &vbcrlf
Next
echo " </ul>" &vbcrlf
echo "</div>" &vbcrlf
End If
case "getarticletitle" echo LFCls.ReplaceDBNull(GetNodeText("fulltitle"),GetNodeText("title"))
case "getarticlesize"
echoln "<script type=""text/javascript"" language=""javascript"">"
echoln "function ContentSize(size)"
echoln "{document.getElementById('MyContent').style.fontSize=size+'px';}"
echoln "</script>"
echoln "【字体:<a href=""javascript:ContentSize(16)"">大</a> <a href=""javascript:ContentSize(14)"">中</a> <a href=""javascript:ContentSize(12)"">小</a>】"
增加上面红色代码即可。
分页导航样式在哪里?