function GetTopTypeName($typeid) { global $dsql; $typeRow = $dsql->GetOne("SELECT typename,topid FROM dede_arctype WHERE id= $typeid"); if ($typeRow['topid'] == '0') { return $typeRow['typename']; } else { $typeRow1 = $dsql->GetOne("SELECT typename FROM dede_arctype WHERE id= $typeRow[topid]"); return $typeRow1['typename']; } } |
然后在模板里面通过标签{dede:field.typeid function=“GetTopTypeName(@me)”}即可
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!