蓝莓博客

  • 今天是

织梦pagebreak文章分页显示设置

摘要:织梦pagebreak文章分页显示设置: 在include/arc.archives.class.php这个类,这个主是来解析文章内容的类 找到 function GetPagebreak(totalPage,nowPage,$aid) functionGetPagebreak($totalPage,$nowPage,$aid){if($totalPag......
分享到:

织梦pagebreak文章分页显示设置:

在include/arc.archives.class.php这个类,这个主是来解析文章内容的类

找到function GetPagebreak(totalPage,nowPage,$aid)

functionGetPagebreak($totalPage,$nowPage,$aid)
{if($totalPage==1){return"";}
//$PageList="<li><a>共".$totalPage."页:</a></li>";
$nPage=$nowPage-1;
$lPage=$nowPage+1;
if($nowPage==1){
//$PageList.="<ahref='#'>上一页</a>";
}else{
if($nPage==1){
//$PageList.="<ahref='".$this->NameFirst.".".$this->ShortName."'>上一页</a>";
}else{
//$PageList.="<ahref='".$this->NameFirst."_".$nPage.".".$this->ShortName."'>上一页</a>";}
}
for($i=1;$i<=$totalPage;$i++){
if($i==1){if($nowPage!=1){
$PageList.="<ahref='".$this->NameFirst.".".$this->ShortName."'>1</a>";
}else{
$PageList.="<ahref='#'class="on">1</a>";}
}else{
$n=$i;
if($nowPage!=$i){
$PageList.="<ahref='".$this->NameFirst."_".$i.".".$this->ShortName."'>".$n."</a>";
}else{
$PageList.="<ahref='#'class="on">{$n}</a>";}
}
}if($lPage<=$totalPage){
//$PageList.="<ahref='".$this->NameFirst."_".$lPage.".".$this->ShortName."'>下一页</a>";
}else{
//$PageList.="<ahref='#'>下一页</a>";
}
return$PageList;
}


来源于蓝莓原文地址: http://www.xiyi88.cn/xq/dede_1477.html