{pc:get sql="SELECT * FROM `v9_news` Order by id DESC " num="10"}
{loop $data $n $r}
< i><a target="{$target}" href="{$r[url]}"><img src="{thumb($r[thumb], $width, $height)}" alt="{$r[title]}"></a></i>
< i><a href="{$r[url]}" target="{$target}">{str_cut($r[title], $titlelen,'')}</a></i>
< i>{str_cut($r[description], $introlen)}</i>
{/loop}
{/pc}
调用热门文章的代码如下:
{pc:content action="hits" catid="$r[catid]" num="10" order="views DESC" cache="3600"}
{loop $data $r}<li>·<a href="{$r[url]}" title="{$r[title]}" target="_blank">{str_cut(strip_tags($r[title]),33)}</a></li>{/loop}
{/pc}