原文地址:http://javaz.cn/site/javaz/site_study/info/2015/39423.html html
项目地址:http://www.freeteam.cn/ java
若是想实现几天内发布的新闻标题前增长一个new图标,可使用newsdays,isnew来实现 url
首先须要在标签中设置属性newdays,如设置为7天,则7天内发布的新闻的isnew属性值就为设置为1,示例以下 spa
<@infoList siteid="${site.id}" channelparid="${channel.id}" num="6" beginnum="1" newdays="7" titleLen="16" dateFormat="MM.dd" order="1"; info,index> orm
<li><span class="time">[${info.addtimeStr}] </span><a href="${info.pageurl}" title="${info.title!""}">${info.showtitle}</a> htm
<#if ('1'==(info.istop!''))><img src="${contextPathNo}${site.htmlpath}/resources/images/top.png" ></#if> get
<#if ('1'==(info.isnew!''))><img src="${contextPathNo}${site.htmlpath}/resources/images/news.png" ></#if> it
</li> class
</@infoList> date