复制代码代码如下:
//获取上级栏目名称
if ( ! function_exists('GetParentTypename'))
{
function GetParentTypename($id){
global $dsql ;
$reid = $dsql->GetOne("SELECT reid FROM wz_arctype where id=@me");
$reid = $reid['reid'];
$row1 = $dsql->GetOne("SELECT typename FROM wz_arctype where id=$reid");
return $row1['typename'];
}
}
列表或频道页调用方法
复制代码代码如下:{dede:field.typeid function="GetParentTypename(@me)"/}