11# Flowpack.SearchPlugin
22
3- This plugin is just a very bare-bones basis for a Search-Plugin, to be used together with
4- Flowpack.ElasticSearch.ContentRepositoryAdaptor or Flowpack.SimpleSearch.ContentRepositoryAdaptor.
3+ This plugin is just a very bare-bones basis for a Search Plugin, to be used together with
4+ [ Flowpack.ElasticSearch.ContentRepositoryAdaptor] ( https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor )
5+ or [ Flowpack.SimpleSearch.ContentRepositoryAdaptor] ( https://github.com/Flowpack/Flowpack.SimpleSearch.ContentRepositoryAdaptor ) .
56
67## Installation
78
8- Make sure to include the Routes from this package into your main ` Configuration/Routes.yaml ` by the following snippet:
9-
10- -
11- name: 'Flowpack.SearchPlugin'
12- uriPattern: '<SearchSubroutes>'
13- subRoutes:
14- 'SearchSubroutes':
15- package: 'Flowpack.SearchPlugin'
9+ Inclusion of the routes from this package into your main ` Configuration/Routes.yaml ` is no longer needed as of Flow 4.0.
1610
1711## Configuration
1812
1913
2014### Pagination
2115
22- The pagination search results can be configured via TypoScript . The following shows the defaults:
16+ The pagination search results can be configured via Fusion . The following shows the defaults:
2317
2418 prototype(Flowpack.SearchPlugin:Search).configuration {
2519 itemsPerPage = 25
26- insertAbove = ${ false}
27- insertBelow = ${ true}
20+ insertAbove = false
21+ insertBelow = true
2822 maximumNumberOfLinks = 10
2923 }
3024
3125### Custom result rendering
3226
33- The result list is rendered using a TypoScript object of type ` nodeType + 'SearchResult' ` for each hit.
27+ The result list is rendered using a Fusion object of type ` nodeType + 'SearchResult' ` for each hit.
3428Thus you can easily adjust the rendering per type like this for an imaginary ` Acme.AcmeCom:Product ` nodetype:
3529
36- prototype(Acme.AcmeCom:ProductSearchResult) < prototype(TYPO3 .Neos:DocumentSearchResult) {
30+ prototype(Acme.AcmeCom:ProductSearchResult) < prototype(Neos .Neos:DocumentSearchResult) {
3731 templatePath = 'resource://Acme.AcmeCom/Private/Templates/SearchResult/ProductSearchResult.html'
3832 }
3933
@@ -57,6 +51,6 @@ The plugin comes with a controller that can be reached like this per default, us
5751
5852 {f:uri.action(action: 'index', controller: 'AjaxSearch', package: 'Flowpack.SearchPlugin', absolute: 1)}
5953
60- It expects the search term as a parameter named ` q ` (as defined in ` AjaxSearch.ts2 ` ). This controller
54+ It expects the search term as a parameter named ` q ` (as defined in ` AjaxSearch.fusion ` ). This controller
6155renders the search results and returns them as HTML without any of the page template. It can therefore
6256be used to request search results via AJAX and display the result by adding it to the DOM as needed.
0 commit comments