问题发布与回答 发表于 2019-3-28 11:46:50

aspcms TAG标签列表怎么在首页调用

aspcms tag标签列表怎么在首页调用
回答:
经本人小改一下index.asp页面 TAG可以首页调用了,代码贴出来分享

<!--#include file="inc/AspCms_SettingClass.asp" -->
< %
if runMode="0" then
dim tags
dim templateobj,templatePath : set templateobj = new TemplateClass
templatePath=sitePath&"/"&"templates/"&setting.defaultTemplate&"/"&setting.htmlFilePath&"/index.html"
'die templatePath
if not CheckTemplateFile(templatePath) then echo "index.html"&err_16
with templateObj
.content=loadFile(templatePath)
.parseHtml()
.parseCommon
templateObj.parseList 0,1,"taglist","","tags"
templateObj.parseCommon
tags=templateObj.content
echo .content
end with
set templateobj =nothing : terminateAllObjects
Else
On Error Resume Next
Server.Transfer(sitePath&setting.languagepath&"index"&FileExt)
If -2147467259 = Err.Number Then Response.Write "<meta http-equiv='Content-Type' content='text/html;charset=gb2312'>缺少首页文件,请登录后台生成首页文件!"
end If
If DebugMode Then echo timer - AppSpan
%>

调用标签
{aspcms:taglist size=10 order=visits}
< A href="" title=""></A>
{/aspcms:taglist}
这里面的size应该是用来分页的,我们把它当作调用数量使用,哈哈,希望大家支持!~
页: [1]
查看完整版本: aspcms TAG标签列表怎么在首页调用