极致cms导航代码调用
判断是否为首页
<li class="{if(!isset($type))}active{/if}"> <a href="/">网站首页</a> </li>
{loop table="classtype" isshow="1" pid="0" as="v" orderby="id Asc"}
<?php var_dump($v);?>
<li class="{if(haschild($classtypedata,$v['id']))} more{/if} {if($type['id']==$v['id'] || $type['pid']==$v['id'])}active{/if}"><a href="{$v['url']}">{$v['classname']}</a>
{if(haschild($classtypedata,$v['id']))}
<ul class="nav-list2">
{foreach $classtypedata[$v['id']]['children']['list'] as $vv}
<li><a href="{$vv['url']}">{$vv['classname']}</a></li>
{/foreach}
</ul>
{/if}
</li>
{/loop}
这里包含判断是否为首页,判断导航标签高亮,判断是否有子栏目