@Component public class CmsFacetSearchDirective extends CmsSearchDirective
返回结果
page
分面搜索结果FacetPageHandler
page.list
:List类型 查询结果实体列表
CmsContent
<@cms.facetSearch word='cms' pageSize=10> <p> category: <#list page.facetMap.categoryId as k,v><@cms.category id=k>${object.name}</@cms.category>(${v})</#list></p> <p> model: <#list page.facetMap.modelId as k,v><@cms.model id=k>${object.name}</@cms.model>(${v})</#list></p> <#list page.list as a><p>${a.title}</p></#list> </@cms.facetSearch>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/facetSearch?word=cms&pageSize=10', function(data){ console.log(data.page.totalCount); }); </script>
contentConfigComponent, fileUploadComponent
ADVANCED, AUTH_TOKEN, AUTH_USER_ID, siteComponent
log
构造器和说明 |
---|
CmsFacetSearchDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
query
execute, expose, getAdvanced, getApp, getSite, getUserId, needAppToken, needUserToken, supportAdvanced
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
execute
在接口中 Directive
execute
在类中 CmsSearchDirective
java.io.IOException
freemarker.template.TemplateException