原文地址:http://javaz.cn/site/javaz/site_study/info/2015/39423.html
?
?
如果想实现几天内发布的新闻标题前增加一个new图标,可以使用newsdays,isnew来实现
首先需要在标签中设置属性newdays,如设置为7天,则7天内发布的新闻的isnew属性值就为设置为1,示例如下
?
<@infoList siteid="${site.id}" channelparid="${channel.id}" num="6" beginnum="1" newdays="7" titleLen="16"? dateFormat="MM.dd" order="1"; info,index>
??????????????????????????? <li><span class="time">[${info.addtimeStr}] </span><a href="${info.pageurl}" title="${info.title!""}">${info.showtitle}</a>
??????????????????????????? <#if (‘1‘==(info.istop!‘‘))><img src="${contextPathNo}${site.htmlpath}/resources/images/top.png" ></#if>
??????????????????????????? <#if (‘1‘==(info.isnew!‘‘))><img src="${contextPathNo}${site.htmlpath}/resources/images/news.png" ></#if>
??????????????????????????? </li>
</@infoList>
?
?
开源 java CMS - FreeCMS商业版isnew,newdays的使用方法
原文:http://qiangqiang.iteye.com/blog/2252862