下载地址:http://code.google.com/p/freecms/ html
commentPage 缓存
从FreeCMS 1.2 开始支持 google
根据参数提取评论对象。 spa
参数 code |
说明 orm |
siteid htm |
站点id 对象 |
objtype 排序 |
评论对象类型 ci |
objid |
评论对象id |
membername |
会员名称 |
isanonymous |
是否匿名 1是 0否 |
order |
排序类型 1发表时间降序(默认) 2发表时间升序
|
state |
审核状态 空字符串表示全部(默认) 1已审核 0未审核 |
cache |
是否使用缓存,默认为false |
page |
当前第几页,默认1 |
action |
分页跳转页面 |
返回值 |
说明 |
commentList |
评论对象列表,类型为List<数据对象comment> |
pager |
分页对象 |
示例1
分页提取评论,每页显示10条。
<@commentPage num='10' page='1' objtype="info" objid="${currInfo.id}" action='${contextPath}templet_pro.do?siteid=${site.id}&templetPath=comment.html';commentList,pager>
<ul>
<#list commentList as comment>
<li>
分页:${comment.content!""}
</li>
</#list>
</ul>
${pager.formPageStr}
</@commentPage>