1. PHPCMS调用三级栏目名称的方法:
{pc:content action="category" catid="13" num="20" siteid="$siteid" order="listorder ASC"}
{loop $data $c}
<div class="cpdhk">
<h3 ><a>{$c['catname']}</a></h3>
<ul>
{loop subcat($c['catid']) $c2}
<li><a href="{$c2['url']}">{$c2['catname']}</a></li>
{/loop}
</ul>
</div>
{/loop}
{/pc}
2. PHPCMS调用三级栏目下的文章的方法及代码
{pc:content action="category" catid="$catid" num="99" order="listorder ASC"}
{loop $data $cat}
{pc:content action="lists" catid="$cat['catid']" order="id DESC" num="6" return="subcate"}
{if $subcate}
<h2><a href="{$cat['url']}">{$cat['catname']}</a></h2>
<ul class="news_list">
{loop $subcate $r}
<li><span>{date('Y/m/d H:i',$r['inputtime'])}</span><a{if $n==1} class="b"{/if} href="{$r['url']}">
{$r['title']}</a></li>
{/loop}
</ul>
{/if}
{/pc}
{/loop}
{/pc}
新闻热点
疑难解答