在织梦系统会员中心模板,你想要统一跟首页头尾对应,想要引入其他有标签的模板的话 {dede:include filename=head.htm/} 是不能用的,我们可以写个自定义方法来实现 打开 /include/extend.func.php 在文件的最下面加入一个方法 /** * 引入有标签模板调用方法 * * @access public * @param string $filename模板或路径 * @return string */ if (!function_exists( pasterTe […]
在织梦系统会员中心模板,你想要统一跟首页头尾对应,想要引入其他有标签的模板的话 {dede:include filename="head.htm"/} 是不能用的,我们可以写个自定义方法来实现
打开 /include/extend.func.php 在文件的最下面加入一个方法
if(!function_exists('pasterTempletDiy'))
{
function pasterTempletDiy($filename)
{
global $cfg_df_style;
if($filename=='')
{
return '';
}
if( file_exists($filename) )
{
$tmpfile = $filename;
}
else if(file_exists(DEDEROOT.'/templets/'.$cfg_df_style.'/'.$filename) )
{
$tmpfile = DEDEROOT.'/templets/'.$cfg_df_style.'/'.$filename;
}
else
{
echo "无法在这个位置找到: $filename";
}
require_once(DEDEINC."/arc.partview.class.php");
$dtp = new PartView();
$dtp->SetTemplet($tmpfile);
$dtp->Display();
}
}
在织梦系统会员模板里引入默认模板的头部尾部 标签写法
<?php
pasterTempletDiy("head.htm");
?>
在织梦系统会员模板里引入会员模板里面带织梦 标签写法
例如,我在会员模板目录里写一个 diy.htm 里面写织梦的标签

在会员首页模板里加上调用代码
<?php
pasterTempletDiy(DEDEMEMBER."/templets/diy.htm");
?>
最终效果
