织梦二级子栏目下拉菜单参考currentstyle=’active’ dede:channelartlist

一、pc网站织梦二级子栏目下拉菜单实现代码:

{dede:channelartlist typeid='top' currentstyle='active'}
              <li class='{dede:field.currentstyle/}'>
                <div class="li-parent-div li-parentOne-div"><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}<i class="fa fa-plus"></i></a></div>
                <i class="nav_simpline_cur"></i>
                <div class="submenu">
                  <div class="back-div"><i class="fa fa-angle-left"></i><span>返回</span></div>
                  <ul>
                    {dede:channel type='son' noself='yes'}
                    <li><a href="[field:typeurl/]">[field:typename/]</a></li>
                    {/dede:channel}
                  </ul>
                </div>
              </li>
              {/dede:channelartlist}

 

织梦二级子栏目下拉菜单参考currentstyle=’active’ dede:channelartlist

二、手机移动站织梦二级子栏目下拉菜单实现代码:

<li {dede:field name=typeid runphp="yes"}(@me=="")? @me=" class='active' ":@me="";{/dede:field}><a href="/">网站首页</a><i class="nav_simpline_cur"></i></li>
            {dede:channelartlist typeid='top' currentstyle='active'}
            <li class='{dede:field.currentstyle/}'>
              <div class="li-parent-div li-parentOne-div"><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}
                {dede:field name=typeid runphp="yes"}
                global $dsql;
                $sql = "SELECT id From `dede_arctype` WHERE reid='@me' And ishidden<>1 order by sortrank asc limit 0, 100 ";
                $row = $dsql->GetOne($sql);      
                @me=is_array($row)?'<i class="fa fa-plus"></i>':'';
                {/dede:field}</a></div>
              <i class="nav_simpline_cur"></i>
              <div class="submenu">
                <div class="back-div"><i class="fa fa-angle-left"></i><span>返回</span></div>
                <ul>
                  {dede:channel type='son' noself='yes'}
                  <li><a href="[field:typeurl/]">[field:typename/]</a></li>
                  {/dede:channel}
                </ul>
              </div>
            </li>
            {/dede:channelartlist}

样式可以根据自己的需要修改即可,功能方面是齐整的。