Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{velocity output="false"}} | ||
2 | #set ($solrConfig = { | ||
3 | 'queryFields': { | ||
4 | 'DOCUMENT': 'property.ExtensionCode.ExtensionClass.id^6 property.ExtensionCode.ExtensionClass.name^6 property.ExtensionCode.ExtensionClass.summary^3 property.ExtensionCode.ExtensionClass.description property.Store.Code.PayingAppsClass.documentation' | ||
5 | }, | ||
6 | 'filterQuery': [ | ||
7 | 'type:DOCUMENT', | ||
8 | 'class:ExtensionCode.ExtensionClass' | ||
9 | ], | ||
10 | 'facetEnabled': false, | ||
11 | 'highlightEnabled': false | ||
12 | }) | ||
13 | {{/velocity}} | ||
14 | |||
15 | {{include reference="Main.SolrSearchConfig" /}} | ||
16 | |||
17 | {{include reference="Main.SolrSearchMacros" /}} | ||
18 | |||
19 | {{include reference="Store.Content.Featured" /}} | ||
20 | |||
21 | {{include reference="Store.Content.Banner" /}} | ||
22 | |||
23 | {{velocity output="false"}} | ||
24 | ## Custom search UI for Store | ||
25 | #macro (displaySearchResults) | ||
26 | {{html clean="false"}} | ||
27 | <div class="list-product"> | ||
28 | #set ($results = $searchResponse.results) | ||
29 | #if ($results && $results.size() > 0) | ||
30 | #foreach ($searchResult in $results) | ||
31 | ## Show 3 results per row. | ||
32 | #if ($foreach.index % 3 == 0) | ||
33 | ## Start a new row. | ||
34 | <div class="row"> | ||
35 | #end | ||
36 | #set ($searchResultReference = $services.solr.resolve($searchResult)) | ||
37 | #displayStoreItem($searchResultReference) | ||
38 | #if ($foreach.index % 3 == 2) | ||
39 | ## Close the open row. | ||
40 | </div> | ||
41 | #end | ||
42 | #end | ||
43 | ## Close the last open row in case the results count is not a multiple of 3. | ||
44 | #if ($results.size() % 3 != 0) | ||
45 | </div> | ||
46 | #end | ||
47 | #else | ||
48 | <div class="col-xs-12"> | ||
49 | $services.localization.render('store.search.noResults') | ||
50 | </div> | ||
51 | #end | ||
52 | </div> | ||
53 | {{/html}} | ||
54 | #end | ||
55 | |||
56 | #macro (displayStoreSearchUI) | ||
57 | (% class="store-search bottom" %)((( | ||
58 | == Search extensions == | ||
59 | #displaySearchUI | ||
60 | ))) | ||
61 | #end | ||
62 | {{/velocity}} | ||
63 | |||
64 | {{velocity}} | ||
65 | ## We don't want to display again the banner and the search form when this page is included in anoter one. | ||
66 | #if ($doc.fullName == 'Store.Search' || $doc.fullName == 'Main.Search') | ||
67 | #displayBanner | ||
68 | #displayStoreSearchUI | ||
69 | #end | ||
70 | {{/velocity}} |