下载地址:http://code.google.com/p/freecms/
commentPage
从FreeCMS 1.2开始支持
根据参数提取评论对象。
| 参数 | 说明 |
| siteid | 站点id |
| objtype | 评论对象类型 |
| 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>
本文介绍了FreeCMS 1.2版本中新增的评论系统功能,包括如何通过参数提取特定站点和类型的评论对象,并展示了如何使用模板标签进行分页展示。
285

被折叠的 条评论
为什么被折叠?



