详情页

帝国cms获取当前页的地址

时间:2024年03月30日

编辑:佚名

帝国cms获取当前内容页地址在内容页使用
修改e/class/functions.php
在函数
//生成内容文件
function GetHtml
中插入四个个语句
第一处
插 入 点:if($pf&&strstr($add[$pf],$expage))//有分页
插入方式:之前
插入语句:$thislink=$dolink.$add[filename].$filetype;
第二处
插 入 点:$file=$doclasspath.$newspath.$add[filename].'_'.$j.$filetype;
插入方式:之后
插入语句:$thislink=$dolink.$add[filename].'_'.$j.$filetype;
第三处
插 入 点:$string=str_replace('[!--title.select--]',$titleselect,$string);
插入方式:之后
插入语句:$string=str_replace('[!--jiuhecai.page.url--]',$thislink,$string);
第四处
插 入 点:$string=str_replace('[!--title.select--]','',$string);
插入方式:之后
插入语句:$string=str_replace('[!--jiuhecai.page.url--]',$thislink,$string);
使用方法: 内容页,使用标签[!--jiuhecai.page.url--] 调用。
获取列表页地址。在列表页使用
修改函数
//生成信息列表
function ListHtml
插入三个语句。
第一处
插 入 点:$string=str_replace('[!--list.pageno--]',($pagenum==1?'':$pagenum),$string);
插入方式:之后
插入语句:$string=str_replace('[!--jiuhecai.page.url--]',$thislink,$string);
第二处
插 入 点:$path=$dopath."index_".$ok.$dotype;
插入方式:之后
插入语句:$thislink=$dolink."index_".$ok.$dotype;
相关文章
猜你需要