主页 > 网站建设 > 建站知识 > DEDECMS5.7让留言板调用{dede:include filename="head.ht

DEDECMS5.7让留言板调用{dede:include filename="head.ht

POST TIME:2017-12-15 22:23

DEDECMS5.7让留言板调用{dede:include filename="head.htm"/}的方法:

首先找到include/common.func.php这个文件,

然后加这个文件最后面,?>这个前面加上:

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();
}
function pasterTempletDiy2($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);
$temstr = $dtp->GetResult();
return $temstr;
}

然后在留言板文件中templets/plus/guestbook.htm

加入如下代码即可引入导航栏。

<?php
pasterTempletDiy("default/head.htm");
?>



收缩
  • 微信客服
  • 微信二维码
  • 电话咨询

  • 400-1100-266