自定义模板用于非单页栏目时出错的修改
>首页 -> 社会专题 -> 硬件网络 2012-02-25 来源: 作者:暗辰 【】 浏览:642

【问题所在】:

    在使用自定义模板时发现 

在 单页栏目 情况下   自定义模板正常显示!

            产品栏目

在     图片栏目 情况下   【列表页】显示正常 【内容页】显示不正常

            下载栏目或 【列表页】显示不正常 【内容页】显示正常

【修改方案】:

   修改: \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

您看到此篇文章时的感受是:
Tags:动易 责任编辑:佚名
免责申明: 除原创及很少部分因网文图片遗失而补存外,本站不存储任何有版权的内容。你看到的文章和信息及网址索引均由机器采集自互联网,由于时间不同,内容可能完全不同,请勿拿本网内容及网址索引用于交易及作为事实依据,仅限参考,不会自行判断者请勿接受本站信息,本网转载,并不意味着赞同其观点或证实其内容的真实性.如涉及版权等问题,请立即联系管理员,我们会予以更改或删除,保证您的权利.对使用本网站信息和服务所引起的后果,本网站不作任何承诺.
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论:0条】 【关闭】 【返回顶部
更多
上一篇动易后台单页栏目出错问题解决 下一篇动易风格模板(CSS)定义内容
密码: (新用户注册)

最新文章

图片主题

热门文章

推荐文章

相关文章

便民服务

手机扫描

空间赞助

快速互动

论坛互动
讨论留言

有事联系

有哪个那个什么的,赶紧点这里给DOVE发消息

统计联系

MAIL:gnlt@Dovechina.com
正在线上:1360

版权与建议

任何你想说的