{dede:type}[field:typename /]{/dede:type} dede:type 调用栏目参数field:typelink 栏目地址field:typename 栏目名称
dede调用当前栏目的标题{dede:field.typename/}
dede调用当前栏目的顶级栏目{dede:field.typeid function="GetTopName(@me)"/}
function GetTopName($id)
{
global $dsql;
$row = $dsql->GetOne("SELECT typename,topid FROM `#@__arctype` WHERE id= $id");
if ($row['topid'] == '0')
{
return $row['typename'];
}
else
{
$row1 = $dsql->GetOne("SELECT typename FROM `#@__arctype` WHERE id= $row[topid]");
return $row1['typename'];
}
}
直接调用栏目的id不就可以吗