这个文件在DedeCMS 5.6版本中默认存在,但在5.5版本中可能不存在。如果不存在,请手动创建一个。 然后,在该文件中加入以下函数:
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");
?>