织梦系统所有栏目及子菜单调用代码

2019-01-13 16:42:38 runsly
织梦系统所有栏目及子菜单调用代码

       {dede:channelartlist typeid='top' currentstyle='current-menu-item'}
        <li class="Lev1 {dede:field.currentstyle/} page_item" id="nav_8"> <a href="{dede:field name='typeurl'/}" class="menu1">{dede:field name='typename'/} <i {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)?'class="fa fa-caret-down"':'style="display:none"';
          {/dede:field}></i></a>
          <ul {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)?'class="dr-menu sub-menu2"':'style="display:none"';
            {/dede:field}>
            {dede:channel type='son' noself='yes'}
            <li class="Lev2"> <a href="[field:typeurl/]" class="menu2">[field:typename/]</a>
            </li>
            {/dede:channel}
          </ul>
        </li>
        {/dede:channelartlist}

为您推荐