导航
2020-01-19 本文已影响0人
Stonesy
<header>
<img src="{IMG_PATH}img/header/banner.png" />
</header>
<nav>
<img id="logo" src="{IMG_PATH}img/header/q_logo.png" />
<div class="menu"><span></span><span></span><span></span><span></span></div>
<ul>
{pc:content action="category" catid="0" num="25" siteid="$siteid" order="listorder ASC"}
<li class="{if !$catid}curr{/if}"><a href="{siteurl($siteid)}">首页</a></li>
{loop $data $r}
<!-- 一级栏目循环开始 -->
<li class="{if $r[catid] == $catid}curr{/if}"><a href="{$r[url]}">{$r[catname]}</a>
{if $r[child]}
<!--是否有子栏目-->
<ul>
{pc:content action="category" catid="$r[catid]" num="15" siteid="$siteid" order="listorder ASC"
return="data2"}
{loop $data2 $v}
<!--子栏目循环开始-->
<li><a href="{$v[url]}">{$v[catname]}</a></li>
{/loop}
<!--子栏目循环结束-->
{/pc}
</ul>
{/if}
</li>
{/loop}
<!-- 一级栏目循环结束-->
</ul>
</nav>