DedeCMS留言板或其它自定义页面调用模板的方法

打开"/include/common.func.php",该文件5.6/5.7版本默认存在,5.5的不存在自己建一个。
//留言板或其它自定义页面调用模板的方法
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();
    }
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-24
  • 2021-09-27
  • 2021-11-25
  • 2022-12-23
  • 2022-02-16
  • 2021-12-24
猜你喜欢
  • 2022-12-23
  • 2021-07-13
  • 2021-08-01
  • 2021-06-12
  • 2021-11-16
  • 2022-12-23
相关资源
相似解决方案