获取文档(文章)列表或分页列表,通过全文索引方式。
com.jspxcms.core.web.directive.InfoFulltextListDirective
com.jspxcms.core.web.directive.InfoFulltextPageDirective
'1,2,5'
。默认为当前站点,如果要获取所有站点的数据,可以传空字符串''
。'1,2,5'
。.now
,'2012-06-03'
,'2000-12-20T23:45:09'
。.now
,'2012-06-03'
,'2000-12-20T23:45:09'
。${info.highlightText}
获取。默认:100。根据当前文章标题查询相关文章,并排除当前文章(假设当前为详细页,有默认的info对象):
[@InfoFulltextList q=info.title excludeId=info.id limit='4';list]
[#list list as bean]
<a href="${bean.url}">${substring(bean.title,15,'...')}</a>
[/#list]
[/@InfoFulltextList]
查询标题、关键字、描述和正文获取匹配结果(${info.highlightTitle}
${info.highlightText}
可分别获取关键字高亮的标题和关键字高亮的正文。Param可获取来自URL的参数,如mypage.jspx?q=foo&nodeId=12&beginDate=2013-01-01&endDate=2016-12-22
,可以分别使用Param.q
Param.nodeId
Param.beginDate
Param.endDate
获取):
[@InfoFulltextPage q=Param.q nodeId=Param.nodeId beginDate=Param.beginDate endDate=Param.endDate pageSize=10;pagedList]
<div>相关结果 ${pagedList.totalElements} 篇</div>
[#if pagedList.totalElements > 0]
<div>
[#list pagedList.content as info]
<div><a href="${info.url}">${info.highlightTitle}</a></div>
<div>${info.highlightText}</div>
[/#list]
</div>
[#include "page.html"/]
[/#if]
</div>
[/@InfoFulltextPage]