列表页第一页显示栏目内容(帝国cms7.5栏目修改时,有一个单页内容)+文章列表,后面分页就只显示文章列表。
实现方法如下:
一,自定义一个模板标签[!–class.context–],放到列表模板适当的位置。
二,找到文件e/class/functions.php
三,找到函数function ListHtml,找到$string=str_replace(‘[!–list.pageno–],在下面新增以下代码:
//首页
if($pagenum==1)
{
//子栏目、大栏目
if ($enews==0 || $enews==3) {
$classContext=$empire->fetch1("select eclasspagetext from {$dbtbpre}enewsclassadd where classid='$classid'");
$string=str_replace('[!--class.context--]',$classContext['eclasspagetext'],$string);
}
//标题分类
else if ($enews==5) {
$classContext=$empire->fetch1("select intro from {$dbtbpre}enewsinfotype where typeid='$classid'");
$string=str_replace('[!--class.context--]',$classContext['intro'],$string);
}
else{
$string=str_replace('[!--class.context--]','',$string);
}
}
else
{
$string=str_replace('[!--class.context--]','',$string);
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。