織夢上一頁下一頁列表翻頁單獨調用的實現代碼
導讀:DEDE技術DEDE技術織夢dedecms上一頁和下一頁列表翻頁單獨調用代碼教程。dede免費校板下戰織夢網站模板。
這個效果就是,列表頁上的上一頁和下一頁,就是單獨調用這兩個功能,那么怎么實現呢? 簡單搞了一下,僅作上下翻頁,主頁類似,可自行添加。 修改辦法如下找到這個文件include\arc.listview.class.php修改一下代碼://獲得上一頁和主頁的鏈接if($this->PageNo != 1){$prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>上一頁</a></li>\r\n";$indexpage="<li><a href='".str_replace("{page}",1,$tnamerule)."'>首頁</a></li>\r\n";$uppage.="<a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>上一頁</a>\r\n";}else{$indexpage="<li>首頁</li>\r\n";$uppage.="<a>沒有了</a>\r\n";}//下一頁,未頁的鏈接if($this->PageNo!=$totalpage && $totalpage>1){$nextpage.="<li><a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一頁</a></li>\r\n";$endpage="<li><a href='".str_replace("{page}",$totalpage,$tnamerule)."'>末頁手機模板dede</a></li>\r\n";$downpage.="<a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一頁</a>\r\n";}else{$endpage="<li>末頁</li>\r\n";$downpage.="<a>沒有了</a>\r\n";}紅色是新加的部分然后添加以下紅色代碼:$plist = '';if(preg_match('/up/i', $listitem)) $plist .= $uppage;if(preg_match('/down/i', $listitem)) $plist .= $downpage;if(preg_match('/index/i', $listitem)) $plist .= $indexpage;if(preg_match('/pre/i', $listitem)) $plist .= $prepage;if(preg_match('/pageno/i', $listitem)) $plist .= $listdd;if(preg_match('/next/i', $listitem)) $plist .= $nextpage;if(preg_match('/end/i', $listitem)) $plist .= $endpage;if(preg_match('/option/i', $listitem)) $plist .= $optionlist;if(preg_match('/info/i', $listitem)) $plist .= $maininfo;最后在模板中織夢首頁模板調用以下代碼:{dede:pagelist listitem="up"相關dede免費校板下戰織夢網站模板。
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-21 ,文章織夢上一頁下一頁列表翻頁單獨調用的實現代碼主要講述下一頁,上一頁,織夢網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_32516.html