Wiki source code of SolrClassFacet

Last modified by shahzad kazama on 2023/12/18 18:56

Show last authors
1 {{velocity}}
2 #macro (displaySearchFacetValue_class $classFullName)
3 #set ($classReference = $services.model.resolveDocument($classFullName, 'default'))
4 #set ($hint = $services.localization.render('solr.field.class.definedBy',
5 [$classReference.lastSpaceReference.name, $classReference.name]))
6 #set ($classPrettyName = $stringtool.removeEnd($classReference.name, 'Class'))
7 #set ($translationKey = "solr.field.class.$classPrettyName")
8 #if ($services.localization.get($translationKey))
9 #set ($classPrettyName = $services.localization.render($translationKey))
10 #else
11 ## Some of the default classes have names starting with 'XWiki'.
12 #set ($classPrettyName = $stringtool.removeStart($classPrettyName, 'XWiki'))
13 #set ($classPrettyName = $stringtool.join($stringtool.splitByCharacterTypeCamelCase($classPrettyName), ' '))
14 ## Make sure we don't have isolated upper case letters.
15 #set ($classPrettyName = $classPrettyName.replaceAll('(^| )([\p{Lu}]) ', '$1$2'))
16 #end
17 <span title="$escapetool.xml($hint)">$escapetool.xml($classPrettyName)</span>
18 #end
19 {{html clean="false"}}#displaySearchFacetValues($facetValues {} 'displaySearchFacetValue_class'){{/html}}
20 {{/velocity}}

Tips

You can click on the arrows next to the breadcrumb elements to quickly navigate to sibling and children pages.

Need help?

If you need help with XWiki you can contact: