<!--{foreach from=$news item=news name=foo}-->  
    <!--{if $smarty.foreach.foo.index <7}-->//循环$news中的前7条内容  
        <a  href="#"><!--{$news.content_title}--></a>   
    <!--{/if}-->  
<!--{/foreach}-->  


 

相关文章: