首页 > 教程 >
DEDE获得顶级栏目名称的方法
2023-04-03教程围观次
简介文章介绍functionGetTopTypename($id){global$dsql;$row=$dsql->GetOne("SELECTtypename,topidFROMdede_arctypeWHEREid=$id");if($row['topid']=='0'){return$row['typename'];}else{$row1=$dsql->GetOne("SELECTtypenam
文章介绍
function GetTopTypename($id)
{
global $dsql;
$row = $dsql->GetOne("SELECT typename,topid FROM dede_arctype WHERE id= $id");
if ($row['topid'] == '0')
{
return $row['typename'];
}
else
{
$row1 = $dsql->GetOne("SELECT typename FROM dede_arctype WHERE id= $row[topid]");
return $row1['typename'];
}
function GetTopTypename($id)
{
global $dsql;
$row = $dsql->GetOne("SELECT typename,topid FROM dede_arctype WHERE id= $id");
if ($row['topid'] == '0')
{
return $row['typename'];
}
else
{
$row1 = $dsql->GetOne("SELECT typename FROM dede_arctype WHERE id= $row[topid]");
return $row1['typename'];
}
}
{dede:field name='typeid' function="GetTopTypename(@me)" /}
下载链接:网站源码/小程序源码/网站模板下载