多级导航代码

admin 7月前 354

{$channels=c(0,999,0)}
{loop $channels as $channel}
{if $channel['ifshownav']}
         <li> <a href="{$channel['url']}" class="sf-with-ul">{$channel['name']}<span class="sf-sub-indicator"> <i class="fa fa-angle-down "></i> </span> </a>
{$channels2=c(0,999,$channel['cid'])}
{if isset($channels2) && !empty($channels2)}
         <ul>
{loop $channels2 as $channel2}
{if $channel2['ifshownav']}
          <li> <a href="{$channel2['url']}" class="sf-with-ul">{$channel2['name']}<span class="sf-sub-indicator pull-right"> <i class="fa fa-angle-right "></i> </span> </a>
{$channels3=c(0,999,$channel2['cid'])}
{if isset($channels3) && !empty($channels3)}
           <ul>
{loop $channels3 as $channel3}
{if $channel3['ifshownav']}
            <li><a href="{$channel3['url']}" class="sf-with-ul">{$channel3['name']}</a></li>
{/if}
{/loop}
           </ul>
{/if}
          </li>
{/if}
{/loop}
         </ul>
{/if}
         </li>
{/if}
{/loop}


最新回复 (0)
全部楼主
返回