dedecms 织梦二级菜单的调用

 

 



<ul class="nav navbar-nav navlist">

<li class='nav-item'>
<a href="https://show.metinfo.cn/m/mui019/314/" title="网站首页" class="nav-link
active ">网站首页</a>
</li>
  //单独无二级菜单的调用  typeid 指定栏目ID即可
{dede:type typeid ='10' }
<li class='nav-item m-l-0'>
<a href="[field:typelink/]" target='_self' title="[field:typename/]" class="nav-link ">[field:typename/]</a>
</li>
{/dede:type}

  //有二级嵌套的栏目调用  row指定调用栏目数  typeid指定ID
{dede:channelartlist row='3' typeid='11,12,13' }
<li class="nav-item dropdown m-l-0">
    //栏目链接
<a href="{dede:field name='typeurl'/}"
target='_self' title=">{dede:field name='typename'/}"
class="nav-link dropdown-toggle "
data-toggle="dropdown" data-hover="dropdown"
>
      //栏目名称
{dede:field name='typename'/}</a>

<div class="dropdown-menu dropdown-menu-right dropdown-menu-bullet two-menu">
        //二级栏目嵌套开始
{dede:channel type='son' noself='yes' }
<a href='[field:typelink/]' target='_self'
title="[field:typename/]" class='dropdown-item hassub '>[field:typename/]</a>
        //二级栏目嵌套结束
{/dede:channel}
</div>
</li>
  //嵌套结束
{/dede:channelartlist}
  //单独栏目的调用
{dede:type typeid ='14' }
<li class='nav-item m-l-0'>
<a href="[field:typelink/]" target='_self' title="[field:typename/]" class="nav-link ">[field:typename/]</a>
</li>
{/dede:type}
{dede:type typeid ='15' }
<li class='nav-item m-l-0'>
<a href="[field:typelink/]" target='_self' title="[field:typename/]" class="nav-link ">[field:typename/]</a>
</li>
{/dede:type}
{dede:type typeid ='16' }
<li class='nav-item m-l-0'>
<a href="[field:typelink/]" target='_self' title="[field:typename/]" class="nav-link ">[field:typename/]</a>
</li>
{/dede:type}
</ul>
posted @ 2018-03-22 16:45  雷诺的个人博客  阅读(2382)  评论(0编辑  收藏  举报