帝国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--]