{dede:channelartlist typeid='top'}
{dede:channel type='son' noself='yes'}
{/dede:channel}
{/dede:channelartlist}
{dede:channelartlist typeid='top'}
{/dede:channelartlist}
{dede:channelartlist typeid='top'}
{dede:php}$thisid = $refObj->Fields['id'];
$dsql->SetQuery("Select * from `dede_arctype` where reid=".$thisid." ORDER BY sortrank");
$dsql->Execute();$i=0;
while($arr = $dsql->getArray()){$i = $i +1;$str = implode(',',$arr);if(!empty($str) && $i==1)
{ echo '';}
if(empty($str))
{ echo '';}
{/dede:PHP}
{dede:field name='typename'/}
{/dede:channelartlist}
这种方式虽然更复杂,但也更灵活。
原文链接:https://www.f2er.com/dedecms/404054.html