注冊會員免費
后臺生成首頁
警告提示
如果你網(wǎng)站以下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分頁標簽
支持把首頁分頁的靜態(tài)文件生成在網(wǎng)站根目錄,第2頁以上的html靜態(tài)文件可存放在指定文件夾內(nèi)
防止網(wǎng)站根目錄生成過多html靜態(tài)文件,實現(xiàn)真正的博客樣式
使用說明
選擇對應(yīng)的程序編碼,后臺-模塊-上傳新模塊-安裝
安裝完成后-首頁模板添加下面的數(shù)據(jù)列表標簽和分頁標簽-更新系統(tǒng)緩存-生成首頁
首頁模板分頁數(shù)據(jù)和分頁條標簽寫法按列表的來
index.htm首頁模板數(shù)據(jù)標簽
{dede:list pagesize='10' titlelen='250'}
[field:title/]
{/dede:list}
index.htm首頁數(shù)據(jù)分頁條標簽
{dede:pagelist listitem="index,end,pre,next,pageno" listsize="3"/}
生成全站后首頁空白的解決方法
if($step==3)
{
中間代碼省略...
}
整個改成
if($step==3)
{
$row = $dsql->GetOne("SELECT * FROM `dede_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)
{
//需要生成靜態(tài)
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("完成更新所有文檔,現(xiàn)在開始更新欄目頁!","makehtml_all.php?action=make&step=4&uptype=$uptype&mkvalue=$mkvalue");
exit();
}
如圖
下一篇:織夢后臺模板layui框架
http://www.j4240.cn/chajian/65.html
Copyright © 2019-2025 河南格展網(wǎng)絡(luò)科技有限公司 版權(quán)所有 Powered by 城市建站 | 網(wǎng)站優(yōu)化
備案號:豫ICP備20001987號-2 豫公網(wǎng)安備 41022402000130號
本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!