织梦cms首页分页插件 可无限加载
摘要:织梦首页分页不再需要用ajax,可用于首页无限加载
警告提示
如果你网站以下5个文件做过修改,使用前请备份这5个文件,不然安装插件后会被覆盖!!!
/dede/task_do.php
/dede/makehtml_homepage.php
/dede/makehtml_all.php
/dede/templets/makehtml_homepage.htm
/index.php
功能介绍
本插件可以将DedeCMS在首页模板使用dede:list列表标签和dede:pagelist分页标签
支持把首页分页的静态文件生成在网站根目录,第2页以上的html静态文件可存放在指定文件夹内
防止网站根目录生成过多html静态文件,实现真正的博客样式
使用说明
选择对应的程序编码,后台-模块-上传新模块-安装
安装完成后-首页模板添加下面的数据列表标签和分页标签-更新系统缓存-生成首页
首页模板分页数据和分页条标签写法按列表的来
index.htm首页模板数据标签
1 2 3 |
{dede:list pagesize='10' titlelen='250'} <li><a href="[field:arcurl/]">[field:title/]</a></li> {/dede:list} |
index.htm首页数据分页条标签
1 2 3 4 5 |
<div class="my_pages"> <ul> {dede:pagelist listitem="index,end,pre,next,pageno" listsize="3"/} </ul> </div> |
生成全站后首页空白的解决方法
打开 /dede/makehtml_all.php 找到,大概在50行至69行
1 2 3 4 |
if($step==3) { 中间代码省略... } |
整个改成
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
if($step==3) { $row = $dsql->GetOne("SELECT * FROM `#@__homepageset` "); $templet = str_replace("{style}", $cfg_df_style,$row['templet']); $homeFile = DEDEADMIN.'/'.$row['position']; $homeFile = str_replace("\\", '/', $homeFile); $homeFile = preg_replace("#\/{1,}#" ,'/', $homeFile); if($row['showmod'] == 1) { //需要生成静态 if($row['makemod'] == 1){ require_once DEDEINC."/arc.indexblog.class.php"; $pv = new IndexBlogView(); $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); $pv->MakeHtml(1, $row['npage'], 0, $homeFile, $row['ndir']); }else{ require_once(DEDEINC."/arc.partview.class.php"); $pv = new PartView(); $GLOBALS['_arclistEnv'] = 'index'; $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); $pv->SaveToHtml($homeFile); } $pv->Close(); } else { if (file_exists($homeFile)) @unlink($homeFile); } ShowMsg("完成更新所有文档,现在开始更新栏目页!","makehtml_all.php?action=make&step=4&uptype=$uptype&mkvalue=$mkvalue"); exit(); } |
如图
①本站所有织梦模板资源均来自用户分享和网络收集,如果侵犯了您的权益,请联系网站客服处理
②本站提供的织梦源码,均带数据及演示地址。可以在任一源码详情页查看演示地址。
③由于博主时间紧缺,所有模板源码不提供技术支持。仅部分收费原创源码提供售后
④如遇模板源码下载链接打不开或者有错误,请联系网站客服QQ指出纠正。
⑤人民币与金币汇率为1比1,即1元=1金币
织梦楼 » 织梦cms首页分页插件 可无限加载
织梦楼 » 织梦cms首页分页插件 可无限加载