以下代码判断导航栏是否含有子栏目
{dede:field name=typeid runphp="yes"}
global $dsql; $sql = "SELECT id From `dme_arctype` WHERE reid='@me' And ishidden<>1 order by sortrank asc limit 0, 100 ";
$row = $dsql->GetOne($sql);
$res = is_array($row)?'<div class="navCMC-slide"><div class="navCMC-slide-container"><ul class="navCMC-cat2">':'';
@me=$res;
{/dede:field}
{dede:channel type='sun' sanji='1' noself='yes'}
<li class="navCMC-cat2-title col-md-3">
<a href="[field:typelink/]">[field:typename/]</a>
<ul>
{dede:arclist row='3' titlelen='14'}
<li>
<a href="{field:arcurl/}">{field:title/}</a>
</li>
{/dede:arclist}
</ul>
</li>
{/dede:channel}
{dede:field name=typeid runphp="yes"}
global $dsql; $sql = "SELECT id From `dme_arctype` WHERE reid='@me' And ishidden<>1 order by sortrank asc limit 0, 100 ";
$row = $dsql->GetOne($sql);
$res=is_array($row)?'</ul></div></div>':'';
@me=$res;
{/dede:field}
{dede:channel type='son' noself='yes'}关闭无子栏目时取同级栏目