以下代码是mlecms 中 调用栏目 一下子控制所有栏目 以下是四个栏目 怎么改写成一个栏目 然后 我想在首页 只调用一个栏目所有新闻<!-- 类别数据调用 四大块 -->
<div class="column_data">
{:foreach category::data(1,$mle['channel']['id'],0,1) as $i => $c:}
<div class="recom">
<!--标题名称-->
<div class="caption">
<ol class="heading">{:$c['title']:}</ol>
<ol class="more"><a href="{:$c['URL']:}"><img src="{:$web['path']:}images/more.gif" width="42" height="20" /></a></ol>
</div>
<div class="circle">
{:$c['introduction']:}
{:foreach article::data(0,5,0,$mle['channel']['id'],$c['id']) as $a:}
<ol><a href="{:$a['URL']:}" title="{:$a['title']:}">{:$a['title_format']:}</a>
{:if $a['newslog']=='1':}
<img src="{:$web['path']:}images/hot.gif" width="29" height="21" />
{:elseif $a['newslog']=='2':}
<img src="{:$web['path']:}images/best.gif" width="29" height="21" />
{:else:}
{:if (strtotime($a['addtime'])+172800)>time():}
<img src="{:$web['path']:}images/new.gif" width="29" height="17" />
{:else:}
{:/if:}
{:/if:}
</ol>
{:/foreach:}
</div>
</div>
{:/foreach:}
</div>
</div>
<div class="column_data">
{:foreach category::data(1,$mle['channel']['id'],0,1) as $i => $c:}
<div class="recom">
<!--标题名称-->
<div class="caption">
<ol class="heading">{:$c['title']:}</ol>
<ol class="more"><a href="{:$c['URL']:}"><img src="{:$web['path']:}images/more.gif" width="42" height="20" /></a></ol>
</div>
<div class="circle">
{:$c['introduction']:}
{:foreach article::data(0,5,0,$mle['channel']['id'],$c['id']) as $a:}
<ol><a href="{:$a['URL']:}" title="{:$a['title']:}">{:$a['title_format']:}</a>
{:if $a['newslog']=='1':}
<img src="{:$web['path']:}images/hot.gif" width="29" height="21" />
{:elseif $a['newslog']=='2':}
<img src="{:$web['path']:}images/best.gif" width="29" height="21" />
{:else:}
{:if (strtotime($a['addtime'])+172800)>time():}
<img src="{:$web['path']:}images/new.gif" width="29" height="17" />
{:else:}
{:/if:}
{:/if:}
</ol>
{:/foreach:}
</div>
</div>
{:/foreach:}
</div>
</div>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货