国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

DEDECMS列表偽靜態修改_DedeCms教程

2024-08-30 19:09:41
字體:
來源:轉載
供稿:網友

打開inc_arclist_view.php
查找
//---------------------------------
//獲取動態的分頁列表
//---------------------------------

對比以下代碼修改
function GetPageListDM($list_len,$listitem="index,end,pre,next,pageno")
{
$prepage="";
$nextpage="";
$prepagenum = $this->PageNo-1;
$nextpagenum = $this->PageNo+1;
if($list_len==""||ereg("[^0-9]",$list_len)) $list_len=3;
$totalpage = ceil($this->TotalResult/$this->PageSize);
if($totalpage<=1 && $this->TotalResult>0) return "共1頁/".$this->TotalResult."條記錄";
if($this->TotalResult == 0) return "共0頁".$this->TotalResult."條記錄";
$maininfo = "共{$totalpage}頁/".$this->TotalResult."條記錄";

$purl = $this->GetCurUrl();
$geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
$gettypeid =$this->TypeID."-";
//$hidenform = "<input type='hidden' name='typeid' value='".$this->TypeID."'>/r/n";
//$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>/r/n";

$purl .= "?".$geturl;

//獲得上一頁和下一頁的鏈接
if($this->PageNo != 1){
$prepage.="<a href='list-".$gettypeid."$prepagenum.html'>上一頁</a>";
$indexpage="<a href='list-".$gettypeid."1.html'>首頁</a>";
}
else{
$indexpage="首頁";
}

if($this->PageNo!=$totalpage && $totalpage>1){
$nextpage.="<a href='list-".$gettypeid."$nextpagenum.html'>下一頁</a>";
$endpage="<a href='list-".$gettypeid."$totalpage.html'>末頁</a>";
}
else{
$endpage="末頁";
}
//獲得數字鏈接
$listdd="";
$total_list = $list_len * 2 + 1;
if($this->PageNo >= $total_list) {
$j = $this->PageNo-$list_len;
$total_list = $this->PageNo+$list_len;
if($total_list>$totalpage) $total_list=$totalpage;
}else{
$j=1;
if($total_list>$totalpage) $total_list=$totalpage;
}
for($j;$j<=$total_list;$j++){
$listdd.="<a href='list-".$gettypeid."$j.html'>".$j."</a>";
}
$plist .= $maininfo.$indexpage.$prepage.$listdd.$nextpage.$endpage;
return $plist;
}

打開inc_channel_unit_functions.php

查找
$reurl = $GLOBALS["cfg_plus_dir"]."/list.php?tid=".$typeid;

改成
//$reurl = $GLOBALS["cfg_plus_dir"]."/list.php?tid=".$typeid;
$reurl = "/list-".$typeid.".html";

增加.htaccess文件

內容為
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)list-([0-9]+)/.html$ $1/plus/list.php?tid=$2
RewriteRule ^(.*)list-([0-9]+)-([0-9]+)/.html$ $1/plus/list.php?typeid=$2&PageNo=$3
</IfModule>

官方原帖:http://bbs.dedecms.com/read.php?tid=42132&fpage=3

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 丹阳市| 墨脱县| 青海省| 乐都县| 琼海市| 太白县| 阿鲁科尔沁旗| 周宁县| 内黄县| 阜南县| 靖江市| 武穴市| 海伦市| 霍山县| 夏河县| 江永县| 军事| 安溪县| 玉门市| 云阳县| 澳门| 行唐县| 眉山市| 托克逊县| 襄垣县| 连城县| 时尚| 隆子县| 博罗县| 贵阳市| 孟州市| 佛学| 吉安县| 疏勒县| 上犹县| 雅安市| 江门市| 永德县| 镇坪县| 明星| 黄平县|