织梦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);                                , /*打印栏目上级栏目链接信息*/, $typename = $row['typename'];, $link = GetTypeUrl($row['typeid'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);, @me = "<a href='{$link}'>$typename</a>";                          
返回顶部
跳到底部

Copyright 2011-2024 南京追名网络科技有限公司 苏ICP备2023031119号-6 乌徒帮 All Rights Reserved Powered by Z-BlogPHP Theme By open开发

请先 登录 再评论,若不是会员请先 注册