Code source wiki de SolrWikiFacet

Modifié par Thomas Mortagne le 2022/06/29 13:01

Afficher les derniers auteurs
1 {{velocity}}
2 #macro (displaySearchFacetValue_wiki $wikiName)
3 #set ($wikiPrettyName = $services.wiki.getById($wikiName).prettyName)
4 #if ("$!wikiPrettyName.trim()" == '')
5 #set ($wikiPrettyName = $wikiName)
6 #end
7 $escapetool.xml($wikiPrettyName)
8 #end
9 #set ($actualFacetValues = $facetValues)
10 ## If the list of wikis that are searchable from the main wiki is restricted then we need to hide some values.
11 #if ($solrConfig.wikisSearchableFromMainWiki && $xcontext.isMainWiki() && !$facetRequestValues)
12 #set ($actualFacetValues = [])
13 #foreach ($facetValue in $facetValues)
14 #if ($solrConfig.wikisSearchableFromMainWiki.contains($facetValue.name))
15 #set ($discard = $actualFacetValues.add($facetValue))
16 #end
17 #end
18 #end
19 {{html clean="false"}}#displaySearchFacetValues($actualFacetValues {} 'displaySearchFacetValue_wiki'){{/html}}
20 {{/velocity}}
#getBlogDocument($space $blogDoc)