欢迎分享,转载请注明来源:内存溢出
织梦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 = "$typename";
赞
(0)
打赏
微信扫一扫
支付宝扫一扫
织梦dedecms后台会员留言板验证码关闭
上一篇
2022-09-27
DEDECMS织梦系统生成静态页面提示“模板文件不存在,无法解析文
下一篇
2022-09-27
评论列表(0条)