【问题所在】:
在使用自定义模板时发现
在 单页栏目 情况下 自定义模板正常显示!
产品栏目
在 图片栏目 情况下 【列表页】显示正常 【内容页】显示不正常
下载栏目或 【列表页】显示不正常 【内容页】显示正常
【修改方案】:
修改: \inc\AspCms_CommonFun.asp
找到 getTemplateFile 函数 修改如下:
| Function getTemplateFile(Byval sortID,Byval str,Byval sStyle) getTemplateFile=conn.exec("select SortTemplate from Aspcms_NewsSort where SortID="&SortID ,"r1")(0) if isnul(getTemplateFile) then if str="" then getTemplateFile="about.html" else if sStyle=1 then getTemplateFile=str&".html" elseif sStyle=2 then getTemplateFile=str&"list.html" end if end if else if sStyle=1 or sStyle=0 then getTemplateFile=getTemplateFile&".html" elseif sStyle=2 then getTemplateFile=getTemplateFile&"list.html" end if end if End Function |
【自定义模板使用方法】:
栏目设置:
模板文件名称:item
列表页使用模板:itemlist.html
内容页使用模板:item.html
单页使用模板:item.html