在dedecms当中,所有的后台栏目,都是指定所建的htm代码,进而网站会输出内容。最模板这次二次开发网站,有幸找了写该函数。 如下: function GetTempletFile() { global $cfg_basedir,$cfg_templets_dir,$cfg_df_style; $cid = $this->ChannelUnit->ChannelInfos['nid',; if(!empty($this->Fields['templet',)) { $filetag = MfTemplet($this->Fields['templet',); // if( !preg_match("#\/#", $filetag) ) $filetag = $GLOBALS['cfg_df_style',.'/'.$filetag; } else { $filetag = MfTemplet($this->TypeLink->TypeInfos["temparticle",); } $tid = $this->Fields['typeid',; $filetag = str_replace('{cid}', $cid,$filetag); $filetag = str_replace('{tid}', $tid,$filetag); $tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$filetag; if($cid=='spec') { if( !empty($this->Fields['templet',) ) { $tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$filetag; } else { $tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/article_spec.htm"; } } if(!file_exists($tmpfile)) { $tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/".($cid=='spec...
内容已隐藏,请关注公众号输入验证码查看
本帖支持关注公众号查看
【无套路 无套路 无套路 扫描二维码关注公众号发送【验证码】收到验证码 在上面输入点击提交查看即可显示隐藏内容】
|