dedecmsはすべてのナビゲーション+2次ナビゲーションを呼び出します

2632 ワード

{dede:channelartlist row=5 typeid='top'}
<li><a class="hide" href="{dede:field name='typeurl'/}" title="{dede:field name='typename'/}">{dede:field name='typename'/}</a>
{dede:field name='id' runphp='yes'}
global $dsql;
$sql = "Select typedir,typename from dede_arctype where reid=".@me." order by sortrank limit 0,11";
$dsql->SetQuery($sql);// SQL 
$dsql->Execute();// SQL 
$ns = $dsql->GetTotalRow();
if($ns>0){
 // 
 $xinfo='<ul>';
 while($row = $dsql->GetArray()){
  $xinfo.='<li><a href="'.str_replace('{cmspath}','',$row['typedir']).'">'.$row['typename'].'</a></li>';
 }
 $xinfo.='</ul>';
 @me=$xinfo;
}else{@me='';}
{/dede:field}
</li>
{/dede:channelartlist}