DEDECMS获得当前栏目的上一级栏目的链接及栏目名
发布时间:2021-12-14 10:19 所属栏目:19 来源:互联网
导读:DEDECMS获取当前栏目的上一级栏目的链接及栏目名. {dede:field name=typeid runphp=yes} global $dsql; $typeid = @me; $query = SELECT reid FROM dede_arctype where id = $typeid; $rs = $dsql-GetOne($query); $reid = $rs[reid];//获取到栏目的上级栏目
DEDECMS获取当前栏目的上一级栏目的链接及栏目名. {dede:field name='typeid' runphp='yes'} global $dsql; $typeid = @me; $query = "SELECT reid FROM dede_arctype where id = $typeid"; $rs = $dsql->GetOne($query); $reid = $rs['reid'];//获取到栏目的上级栏目 $query2 = "SELECT * FROM dede_arctype where id = $reid"; $row = $dsql->GetOne($query2); 测试可用:5.7 {dede:field name='typeid' runphp='yes'} global $dsql; $typeid = @me; $query = "SELECT reid FROM dede_arctype where id = $typeid"; $rs = $dsql->GetOne($query); $reid = $rs['reid']; $query2 = "SELECT * FROM dede_arctype where id = $reid"; $row = $dsql->GetOne($query2); $typename = $row['typename']; $link = GetTypeUrl($row['typeid'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']); //开源软件:Cuoxin.com @me = "$typename"; {/dede:field} (编辑:ASP站长网) |
相关内容
网友评论
推荐文章
热点阅读