许小珂最近正在使用织梦搭建公司的营销网站,正好遇到了一个个人觉得很有价值的问题,特来分享给大家:织梦如何实现二级栏目和三级栏目调用的方法

dedecms实现二级栏目调用

{dede:channelartlist row='2' typeid='1,2' }
    <h3>
        <a href='{dede:field name='typeurl'/}'>{dede:field name='typename'/}</a>
    </h3>
    <ul>
        {dede:channel type='son' noself='yes' }
        <li><a href='[field:typelink/]'>[field:typename/]</a></li>
        {/dede:channel}
    </ul>
{/dede:channelartlist}

dedecms实现三级栏目调用

<li>
    {dede:type typeid='1'}
        <a href="[field:typelink/]" title="[field:typename/]">
            <span>[field:typename/]</span>
        </a>
    {/dede:type}
    <ul>
        {dede:channelartlist type='top' typeid='1' row="7"} 
        <li >
            <a href="{dede:field name='typeurl'/}" title="{dede:field name='typename'/}"  style="height:auto;">{dede:field name='typename'/}
            </a>
            <ul>
                {dede:sql sql='Select * from dede_arctype where reid=~id~  ORDER BY id limit 0,2'}
                <li>
                    <a href="[field:typedir function='str_replace("{cmspath}","",@me)'/]"  class="depth_3" title="[field:typename/]"  style="height:auto;">[field:typename/]
                    </a>
                </li>
                {/dede:sql}
            </ul>
        </li> 
        {/dede:channelartlist}
    </ul>
</li>