不少朋友需要在织梦DedeCms的问答系统、留言本、会员空间导航里调用系统标签,但默认是不支持系统标签调用的,需要对系统文件进行简单的修改。第一步:打开"/include/common.func.php",该文件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用以下代码替换原因的调用头部代码<?phppasterTempletDiy("default/head.htm");?>DedeCms的问答及会员空间导航,按上边的方法即可。