{dede:channelartlist typeid='top' row='10' currentstyle="home"} //currentstyle 可以实现栏目切换时改变class状态,但需要修一些文件,具体看下面一段代码
{dede:field name='typename' /}{dede:sql sql='select * from dede_arctype where reid =~id~ '}
[field:id runphp='yes']
global $dsql;
[email protected];
$sql='Select * from dede_arctype where reid='.$id.' ORDER BY id limit 0,20';
$dsql->SetQuery($sql);
$dsql->Execute();
while($row = $dsql->GetArray()){
$url = str_replace("{cmspath}","",$row['typedir']);
$str .=''.$row['typename'].'';
@me = $str;
}
if(@me == $id){ //避免3级栏目为空时 写出分类ID,这里加以判断
@me ='';
}
[/field:id]
{/dede:sql}
{/dede:channelartlist}