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>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM