phpcms配置列表页以及获得文章发布时间

时间:2021-09-29 18:16:20
<div class="moocConDetail">
{pc:content action="lists" catid="11" order="id DESC" num="10" moreinfo="1"}
<ul>
{loop $data $key $val}
{php list($copyfrom) = explode('|', $val['copyfrom'])}
<li>
<a href="{$val['url']}">{$val['title']}</a>
<span class="source">{$copyfrom}</span>
<span class="acTime">{date('Y-m-d',$val[inputtime])}</span>
</li>
{/loop}
</ul>
{/pc}
</div>

调用一级栏目名称跟二级栏目名称:

{$CATEGORYS[$CAT[parentid]][catname]}
{$CATEGORYS[$CAT[catid]][catname]}