帝国CMS一直以来升级没有提供内容分页的上一页标签功能,只有一个:内容页下一页[!--next.page--] 标签!所以下面就是要改造一下这个标签,实现内容页上一页的功能!

步骤如下:

打开e/class/functions.php文件

查找:

//取得当前页

if($thispagenum!=1)

在这个上面增加:

if($thispagenum==$j)

{

$thisshanglink=$dolink.$add[filename].$filetype;

}

else

{

$thisjs=$j-1;

if($thisjs==1){$thisshanglink=$dolink.$add[filename].$filetype;}

else

if($thisjs==0){$thisshanglink=$dolink.$add[filename].$filetype;}

else{$thisshanglink=$dolink.$add[filename].'_'.$thisjs.$filetype;}

}

然后查找:

$string=str_replace('[!--next.page--]',$thisnextlink,$string);

在下面添加:

$string=str_replace('[!--shang.page--]',$thisshanglink,$string);

OK!改造完毕!

内容里调用方法:[!--shang.page--]

更多推荐

html内容页上一页下一页,帝国CMS内容页增加内容分页上一页标签功能!