帝国cms列表分页默认index怎么修改成其他形式?

 2022-10-10    3880  

帝国cms列表分页的样式是index_数字.html,如果我们要改成list_数字.html或者其他形式要怎么操作呢? 一起来看下吧。

下面我们来说说怎么修改这个默认的url及样式。

1. 改分页函数e/class/functions.php里带有index_的字符串,这里是将index改成其它。

第一处

//首页
if($pagenum==1)
{
$path=$dopath."index".$dotype;
}
else
{
$path=$dopath."index_".$ok.$dotype;
}
//取得分页参数
$returnpager=$thefun($num,$pagenum,$dolink,$dotype,$page,$lencord,$ok,$myoptions,$pagefunr);
$showpage=$returnpager['showpage'];
$myoptions=$returnpager['option'];
$list1=str_replace($bereplistpage,$showpage,$list_r[0]);
$list2=str_replace($bereplistpage,$showpage,$list_r[2]);

第二处

function RenameListfile($classid,$lencord,$num,$type,$newtype,$classpath){
$page=ceil($num/$lencord);
for($j=1;$j<=$page;$j++)
{
if($j==1)
{
$listfile=ECMS_PATH.$classpath."/index";
}
else
{
$listfile=ECMS_PATH.$classpath."/index_".$j;
}
@rename($listfile.$type,$listfile.$newtype);
}
}

2、修改e/class/t_functions.php里sys_ShowListPage、sys_ShowListMorePage、sys_ShowTextPage、sys_ShowTextPageSelect函数中的'_'字符串 注意一定是改字符串,不要改函数名,有很多函数名中带有下划线。这里是把下划线改成你想要的样式。比如_改成-等等。

注意修改前可以先备份下,别改错了。你也赶紧试试吧!

分享到:

本文链接:https://blog.lingruofeng.com/seo/31.html

版权声明:本站部分素材来自网络整理,如侵犯了您的合法权益,请联系我们删除!