返回列表2015.08.14

调用网站导航

调用网站主导航代码范例

<ul class="nav left cl">
	{foreach $_Y['nav']['menu'] as $v}
	{if $v['level'] == 1 && $v['open']}
		<li {isnavhover nav=$v}><a href="{$v['url']}" target="{$v['target']}" title="{$v['subtitle']}">{$v['title']}</a>
		{if $v['sub']}
		<ul>
			{foreach $v['sub'] as $v2}
			<li {isnavhover nav=$_Y['nav']['menu'][$v2]}><a href="{$_Y['nav']['menu'][$v2]['url']}" target="{$_Y['nav']['menu'][$v2]['target']}">{$_Y['nav']['menu'][$v2]['title']}</a></li>
			{if $_Y['nav']['menu'][$v2]['sub']}
            <ul>
            	{foreach $_Y['nav']['menu'][$v2]['sub'] as $v3}
            	<li {isnavhover nav=$_Y['nav']['menu'][$v3]}><a href="{$_Y['nav']['menu'][$v3]['url']}" target="{$_Y['nav']['menu'][$v3]['target']}">{$_Y['nav']['menu'][$v3]['title']}</a></li>
                {/foreach}
            </ul>
            {/if}
			{/foreach}
		</ul>
		{/if}
		</li>
	{/if}
    {/foreach}
</ul>


调用网站顶部导航代码范例

<ul class="nav left cl">
	{if $_Y['nav']['top']}
	{foreach $_Y['nav']['top'] as $v}
	{if $v['level'] == 1 && $v['open']}
		<li {isnavhover nav=$v}><a href="{$v['url']}" target="{$v['target']}" title="{$v['subtitle']}">{$v['title']}</a></li>
	{/if}
    {/foreach}
    {/if}
</ul>


调用网站底部导航代码范例

<ul class="nav left cl">
	{if $_Y['nav']['footer']}
	{foreach $_Y['nav']['footer'] as $v}
	{if $v['level'] == 1 && $v['open']}
		<li {isnavhover nav=$v}><a href="{$v['url']}" target="{$v['target']}" title="{$v['subtitle']}">{$v['title']}</a></li>
	{/if}
    {/foreach}
    {/if}
</ul>