标签:content exp loop -- from order div span input
//替换来源:pc标签里面必须加moreinfo="1"不加会调不出来源
{pc:content action="lists" catid="12" order="id ASC" num="4" moreinfo="1"}
{loop $data $key $val}
{php list($val[copyfrom]) = explode(‘|‘, $val[‘copyfrom‘])}<!--将来源进行拆分,来源就是作者-->
<div class="row">
<div class="col-sm-4">
<a href="{$val[‘url‘]}"><img src="{$val[‘thumb‘]}" class="img-responsive xm_pic" /> </a>
</div>
<div class="col-sm-8">
<div class="ry_info">
<h4><span class="ry_sp">新闻名称:</span>{$val[‘title‘]}</h4>//标题
</div>
<div class="ry_info">
<span class="ry_sp">新闻简介:</span>{$val[‘description‘]}//摘要
</div>
<div class="ry_info">
<span class="ry_sp">作者:</span>{$val[copyfrom]}//来源
</div>
<div class="ry_info">
<span class="ry_sp">时间:</span>{date(‘Y-m-d‘,$val[inputtime])}//替换时间
</div>
</div>
</div>
<hr />
{/loop}
{/pc}
标签:content exp loop -- from order div span input
原文地址:http://www.cnblogs.com/liuran123/p/6159103.html