phpcms列表页替换

时间:2024-01-15 12:55:44

根据栏目代号获取栏目图

<img src="{$CATEGORYS[$top_parentid][image]}" width="1200" height="290" />

分页

<div id="chanpinnrwai">
  <div id="chanpinnr">
{pc:content action="lists" catid="$catid" order="id DESC" num="1" page="$page"}//分页
  {loop $data $key $val}
<div class="cp_item">
  <div class="cp_img">
<a href="{$val[url]}">
  <img src="{$val[thumb]}" width="280" height="180" />
</a>
  </div>
  <div class="cp_bt">
{$val[title]}
  </div>
  <div class="cp_jj">
{$val[description]}
  </div>
</div>
  {/loop}
{/pc}
</div>
</div>
<div style="clear:both"></div>
<!--分页-->
<div id="chanpin_fenye">
  <div id="chanpin_fy_nr">
  {$pages}//显示分页
</div>
</div>

phpcms列表页替换

时间替换

时间戳转换时间

{date('Y-m-d H:i:s',$val['inputtime'])}

phpcms列表页替换

具体详细内容替换 moreinfo

{pc:content  action="lists" catid="$catid" order="id DESC" num="1" page="$page" moreinfo="1"}
  {loop $data $key $val}
{$val[content]}
  {/loop}
{/pc}