打开/include/common.func.php文件
在底部加入
<span style="font-size:14px;" deep="13">//获取二级栏目名function GetSecondTypename($id){global $dsql;$row = $dsql->GetOne("SELECT typename,topid,reid FROM dede_arctype WHERE id= $id");if ($row['reid'] == $row['topid']){return $row['typename'];}else{$row1 = $dsql->GetOne("SELECT typename FROM dede_arctype WHERE id= $row[reid]");return $row1['typename'];}}</span>
前端调用
{dede:field name='typeid' function="GetSecondTypename(@me)" /}