企业官网模板企业官网模板

返回列表2019.02.15

调用网站导航

调用网站主导航代码范例

<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>


Copyright © 2019 网站模板网站建设公司版权所有
技术支持:万美云计算

该模版网站数据仅为展示使用,如有侵权,请联系删除!