phpcms实现列表页显示文字来源及点击数量的方法

时间:2021-07-11 08:15:13

代码如下:


{pc:content action="lists" catid="$catid" num="25" order="id DESC" page="$page" moreinfo="1"} 
<ul class="list lh24 f14"> 
{loop $data $r} 
{php list($copyfrom) = explode('|', $r['copyfrom'])} 
<li> 
<div class="dxal_list_title"> 
<span><a href="{$r[url]}" style="color: #05a3c0;">{$r[title]}</a></span> 
</div> 
<p>{str_cut($r[description],300)}...<a href="{$r[url]}" style="color: #05a3c0;">[详细]</a></p><br/> 
<p>发表于:{$copyfrom}&nbsp;&nbsp;&nbsp;点击:{$views}</a></p> 
</li> 
{/loop} 
</ul> 
<div id="pages" class="page">{$pages}</div> 
{/pc}