翻页后的结果如下图
搜索功能按钮部分html:
search.asp文件内容:
<!--#include file="inc/AspCms_SettingClass.asp" -->
<%
echoContent()
Sub echoContent()
dim page,keys
page=filterPara(getForm("page","both"))
keys=filterPara(getForm("keys","both"))
if isNul(keys) then alertMsgAndGo "请输入关键词","-1"
if isNul(page) then page=1
if isNum(page) then page=clng(page) else echoMsgAndGo "页面不存在",3 end if
dim templateobj,channelTemplatePath : set templateobj=new TemplateClass
dim typeIds,rsObj,rsObjtid,Tid,rsObjSmalltype,rsObjBigtype
Dim templatePath,tempStr
templatePath=sitePath&"/"&"templates/"&setting.defaultTemplate&"/"&setting.htmlFilePath&"/search.html"
'die templatePath
if not CheckTemplateFile(templatePath) then echo "search.html"&err_16
with templateObj
.content=loadFile(templatePath)
.parseHtml()
.parseCommon()
.parseList 0,page,"searchlist",keys,"searchlist"
echo .content
end with
set templateobj =nothing : terminateAllObjects
End Sub
%>
网站后台 search.html文件搜索部分功能代码:
<div class="package">
<h2 class="tit"><em class="fl"><img src="/templates/cn/style/images/ico17.png" class="png"/></em><span class="fl">搜索</span><span class="all_bg"></span></h2>
<ul class="list_05">
{aspcms:searchlist size=20 order=id}
<li><span class="fr">[[searchlist:date style=yy-m-d]] </span><a href="[searchlist:link]" title="[searchlist:title]">[searchlist:title]</a>
</li>
{/aspcms:searchlist}
</ul>
<!--分页开始-->
<div style="height:7px;clear:both"></div>
<div class="pcauto_page">
[searchlist:pagenumber len=5]
</div>
<!--分页结束-->