标签:
<ul>
{pc:get sql="SELECT * from v9_news where status=99 and catid in(1,2,3,4,5,6,7,8) order by inputtime DESC" return="data"}
{php $i==1}
{loop $data $r}
{if $r[thumb]!=""}
<li><a href="{$r[‘url‘]}" ><img src="{thumb($r[‘thumb‘],520,280)}" alt="{str_cut($r[‘title‘],44)}" />{$n}{str_cut($r[‘title‘],44)}</a></li>
{php $i++}
{/if}
{php if($i==5)break;}
{/loop}
{/pc}
</ul>
PHPCMS笔记之幻灯片 查询所选栏目有图片的文章并控制显示数量
标签:
原文地址:http://my.oschina.net/vandas/blog/516006