velocity.facets.vm Maven / Gradle / Ivy
The newest version!
#**
* Display facets based on field values
* e.g.: fields specified by &facet.field=
*#
#if($response.facetFields.size() > 0)
Field Facets
#foreach($field in $response.facetFields)
## Hide facets without value
#if($field.values.size() > 0)
$field.name
#foreach($facet in $field.values)
-
#if($facet.name!=$null)$esc.html($display.truncate($facet.name,20))#elsemissing#end ($facet.count)
#end
#end ## end if > 0
#end ## end for each facet field
#end ## end if response has facet fields