DedeCms通用留言板調用導航標頭檔

來源:互聯網
上載者:User

無論是dede5.6還是5.7都沒有解決此問題,不過解決方案也很簡單,接下來教給你怎麼做!
dede裡的留言板guestbook.htm用{dede:include filename=”../default/head.htm”/}不能自動產生導航列表,不能使用default下的標頭檔,現在我來寫一個函數解決這問題:
第一步:開啟"/include/common.func.php",該檔案5.6版本預設存在,5.5的不存在自己建一個。
然後在該檔案中加入一個函數,代碼如下:

 代碼如下 複製代碼

view sourceprint?
function pasterTempletDiy($path){

require_once(DEDEINC."/arc.partview.class.php");

global $cfg_basedir,$cfg_templets_dir;

$tmpfile = $cfg_basedir.$cfg_templets_dir."/".$path;//模版檔案的路徑

$dtp = new PartView();

$dtp->SetTemplet($tmpfile);

$dtp->Display();}

第二步,開啟留言本的模版檔案,預設的是/templets/plus/guestbook.htm
用以下代碼替換原因的調用頭部代碼

<?php pasterTempletDiy("default/head.htm"); ?>
其他的同理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.