加入收藏 | 设为首页 | 会员中心 | 我要投稿 应用网_阳江站长网 (https://www.0662zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > 建站资源 > 经验 > 正文

织梦dedecms子栏目中如何调用其所属顶级栏目的名称和简介

发布时间:2021-12-15 03:29:11 所属栏目:经验 来源:互联网
导读:顶级栏目的名称及链接: {dede:field name=id runphp=yes} global $cfg_basehost,$cfg_cmspath,$cfg_indexurl; $dsql = new DedeSql(false); $a=SELECT tp.reid FROM dede_arctype as tp where tp.id=@me; $arcRow = $dsql-GetOne($a); @me=$arcRow[reid]; i
顶级栏目的名称及链接:
 
{dede:field name='id' runphp="yes"}
 global $cfg_basehost,$cfg_cmspath,$cfg_indexurl;
 $dsql = new DedeSql(false);
 $a="SELECT tp.reid FROM dede_arctype as tp where tp.id=@me";
 $arcRow = $dsql->GetOne($a);
 @me="$arcRow[reid]";
 if(@me==0)@me='首页';
 else {$b="SELECT * FROM dede_arctype as tp where tp.id=@me";
 $tpRow = $dsql->GetOne($b);
 @me=''.$tpRow[typename].'';
 $url=$cfg_basehost.$cfg_cmspath;
 @me=str_replace('{cmspath}',$url,@me);
 }
 $dsql->Close();
 

(编辑:应用网_阳江站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读