在栏目循环中判断栏目id
<ul class="nav nav-menu nav-inline nav-pills text-right">
<li class='active'><a href="/" class="topa"> 首页</a></li>
{eyou:channel type="top" row="60" id="field" currentstyle="active"}
<li class=''><a href="{$field.typeurl}" class="topa" style="color:#fff;">{$field.typename}</a>
{eyou:if condition='($eyou.field.typeid == "4")'}
111
{/eyou:if}
{eyou:notempty name="$field.children"}
<ul class="drop-menu"
>
{eyou:channel name="$field.children" row="100" id="field2"}
<li><a href="{$field2.typeurl}">{$field2.typename}</a></li>
{/eyou:channel}
</ul>
{/eyou:notempty}
</li>
{/eyou:channel}
</ul>
报错显示:
未定义数组索引,错误的标签变量名: field