织梦DedeCMS获取文章副栏目名称和链接
[field:typeid2 runphp='yes']
global $dsql;
if(strstr(@me, ',')){
$typeid2s = explode(',', @me);
$typename2 = '';
foreach($typeid2s as $tid){
$sql = GetSonIds($tid);
$row = $dsql->GetOne("select * from dede_arctype where id=$tid");
$row['typeurl'] =GetTypeUrl($row['typeid'],$row['typedir'],$row['isdefault'],
$row['defaultname'],$row['ispart'],$row['namerule2'],
$row['moresite'],$row['siteurl'],$row['sitepath']);
$typename2 .= '<a href="'.$row['typeurl'].'" target="_blank">'.$row['typename'].'</a> ';
}
}else{
$row = $dsql->GetOne("select * from dede_arctype where id=@me");
$row['typeurl'] = GetTypeUrl($row['typeid'],$row['typedir'],$row['isdefault'],$row['defaultname'],
$row['ispart'],$row['namerule2'],
$row['moresite'],$row['siteurl'],$row['sitepath']);
$typename2 = '<a href="'.$row['typeurl'].'" target="_blank">'.$row['typename'].'</a>';
}
@me = $typename2;
[/field:typeid2]