DEDECMS循环调用多个栏目的栏目名称和栏目内容
{dede:type typeid="1"}
<a href=" [field:typelink /] "> [field:typename/] </a>
{/dede:type}
<a id="{dede:field name='id'/}" href={dede:field name='typeurl'/}" class="tablink arwlink">{dede:field name='typename'/}</a> //顶级栏目名称和链接
{dede:channel type='son' noself='yes'}
<li> <a href="[field:typelink/]">[field:typename/]</a> </li> //子栏目名称和链接
{/dede:channel}
{/dede:channelartlist}
修改include/taglib/channelartlistlibphp第78行改成:
$row = $dsql->GetOne("SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description,content在模板里面
{dede:channelartlist typeid='18,19,20,21,22,23'}<div class="introduce">
<h4><a href='{dede:field name='typeurl'/}'>{dede:field name='typename'/}</a></h4>
<div class="container">
{dede:field name='content'/}
</div>
</div>
{/dede:channelartlist}
0条评论