我們都知道織夢前臺模板調(diào)用頭部和尾部標(biāo)簽是{dede:include filename="*.htm"/} ,但是用到會員中心模板就無效,今天我們介紹一個方法來完成會員模板調(diào)用前臺模板。
1:打開 /include/extend.func.php 在文件的最下面加入一個方法:
/** * 其他頁面調(diào)用模板的頭部尾部模板 * * @access public * @param string $path 模板路徑 * @return string */ if(!function_exists('pasterTempletDiy')) { function pasterTempletDiy($path) { require_once(DEDEINC."/arc.partview.class.php"); global $cfg_basedir,$cfg_templets_dir,$cfg_df_style; $tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style.'/'.$path; $dtp = new PartView(); $dtp->SetTemplet($tmpfile); $dtp->Display(); } } |
2:在織夢會員模板其他頁面引入默認模板的頭部尾部 的標(biāo)簽寫法
<?php pasterTempletDiy("head.htm"); ?> |