有二級(jí)欄目時(shí)一級(jí)欄目的Url輸出 javascript:; 只有一級(jí)欄目就輸出鏈接
判斷是否有子欄目,有就輸出 javascript:; ,沒(méi)有子欄目就直接輸出一級(jí)欄目的鏈接
{dede:field name=typeid runphp=yes}global $dsql;$row = $dsql->GetOne("select * from `dede_arctype` where reid='@me' and ishidden<>1 order by sortrank asc limit 0,1");if(is_array($row)) @me = 'javascript:;'; else @me = GetOneTypeUrlA($dsql->GetOne("select * from `dede_arctype` where id='@me' and ishidden<>1"));{/dede:field}
{dede:channelartlist row=7 typeid=top currentstyle=current}
<li>
<a href="{dede:field name=typeid runphp=yes}global $dsql;$row = $dsql->GetOne("select * from `dede_arctype` where reid='@me' and ishidden<>1 order by sortrank asc limit 0,1");if(is_array($row)) @me = 'javascript:;'; else @me = GetOneTypeUrlA($dsql->GetOne("select * from `dede_arctype` where id='@me' and ishidden<>1"));{/dede:field}"><span>{dede:field.typename/}</span>{dede:channel type='son' row=1 noself='yes'}<i class="touch-arrow-down"></i>{/dede:channel}</a>
{dede:channel type='son' row=1 noself='yes'}
<ul>
{/dede:channel}
{dede:channel type='son' noself='yes'}
<li><a href="[field:typelink/]"><span>[field:typename/]</span></a></li>
{/dede:channel}
{dede:channel type='son' row=1 noself='yes'}
</ul>
{/dede:channel}
</li>
{/dede:channelartlist}
版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 織夢(mèng)導(dǎo)航欄目頂級(jí)和二級(jí)判斷二級(jí)輸出不同url