织梦园模板网提供云优cms模板,pbootcms模板,Wordpress主题模板等各类企业新闻资讯网站模板下载服务。织梦园网站模板交流群
用户名:
密码:
注册
注册后享受折扣价

织梦DedeCMS标签arclistsg调用联动类型

织梦园模板 / 2021-07-17 / 收藏
分享一下arclistsg标签调用联动类型(显示联动连接),小编提醒:本修改方法只适用于dedecms v5.5版本,请勿用于其它版本,以免出错。
 
首先在include\channelunit.func.php中加上:
//联动类型
function GetInfoType($infotype)
{
 global $dsql;
 $typename='';
 $query = " Select ename  From `dede_sys_enum` where egroup = 'infotype' And evalue = '$infotype' ";
 $dsql->Execute('ename',$query);
 while($row=$dsql->GetArray('ename'))
 {
  $typename .=($typename=='' ? $row['ename'] : ','.$row['ename']);
  $typelink = "<a href='$cfg_phpurl/plus/list.php?channelid=-8&infotype=$infotype'>$typename</a>";
 }
 return $typelink;
}

调用方法是在arclistsg标签中添加:
[field:infotype function='GetInfoType(@me)'/]

相关辅助文档

收缩