DEDE调用当前文章栏目内容

找到根目录include\helpers\archive.helper.php在其中添加新函数

/**
*  查询当前文章的父级栏目内容
*/
if ( ! function_exists(‘GetParentContent’))
{
function GetParentContent($id){
global $dsql ;
//获取父级栏目id查询栏目内容
$row1 = $dsql->GetOne(“SELECT content FROM dede_arctype where id=$id”);
return $row1[‘content’];
}
}

调用方法:{dede:field.typeid function=”GetParentContent(@me)”/}