建站常识
DEDECMS织梦留言板调用defualt下头部及底部的方法
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(); //phpfensi.com $dtp->SetTemplet($tmpfile); $dtp->Display(); }
3.找到留言本的模版文件/templets/plus/guestbook.htm,并打开编辑器
4.将下面代码复制粘贴到文件的头部,调用头文件,如果是默认模板风格,无需更改头文件路径,图为头文件路径在zx/head.htm下。
<?php pasterTempletDiy("default/head.htm"); ?>
5.将下面代码复制粘贴到文件的底部,调用底部文件,如果是默认模板风格,无需更改底部文件路径,图为底部文件路径在guestbook下,可直接调用。
<?php pasterTempletDiy("default/footer.htm"); ?>
以上就是如何调用织梦DEDECMS留言板的方法,就可以直接使用系统的head、footer模板了。