|
关于首页掉用{aspcms:topsortid}出错的修改!
/index.asp
.parseHtml()
下加一行
.indexpath
if not CheckTemplateFile(templatePath) then echo "index.html"&err_16
with templateObj
.content=loadFile(templatePath)
.parseHtml()
.indexpath '添加本行
.parseCommon
echo .content
end with
复制代码
/inc/aspcms_mainclass.asp
找到
Public Function parseHtml()
在前面添加一个函数
Public Function indexpath()
content=replaceStr(content,"{aspcms:topsortid}",0)
content=replaceStr(content,"{aspcms:sortid}",0)
End Function
复制代码
到此完成。
首页调用{aspcms:topsortid} 的值为0
生成静态时需要修改另外一个文件
/admin/_seo/AspCms_MakeHtmlFun.asp
找到
'生成首页
Sub makeIndex
在
.parseHtml()
下加一行
.indexpath
if not CheckTemplateFile(templatePath) then echo "index.html"&err_16
with templateObj
.content=loadFile(templatePath)
.parseHtml()
.indexpath
.parseCommon
createTextFile .content, sitePath&setting.LanguagePath&"index"&FileExt,""
end with
复制代码
修改完成!~ |
|