Skip to content

Commit 23c82dd

Browse files
committed
TASK: Document pagination configuration
1 parent ec30d42 commit 23c82dd

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,21 @@ Make sure to include the Routes from this package into your main `Configuration/
1414
'SearchSubroutes':
1515
package: 'Flowpack.SearchPlugin'
1616

17-
## Custom result rendering
17+
## Configuration
18+
19+
20+
### Pagination
21+
22+
The pagination search results can be configured via TypoScript. The following shows the defaults:
23+
24+
prototype(Flowpack.SearchPlugin:Search).configuration {
25+
itemsPerPage = 25
26+
insertAbove = ${false}
27+
insertBelow = ${true}
28+
maximumNumberOfLinks = 10
29+
}
30+
31+
### Custom result rendering
1832

1933
The result list is rendered using a TypoScript object of type `nodeType + 'SearchResult'` for each hit.
2034
Thus you can easily adjust the rendering per type like this for an imaginary `Acme.AcmeCom:Product` nodetype:
@@ -30,7 +44,7 @@ Feel free to use the `DocumentSearchResult.html` in the Flowpack.SearchPlugin as
3044
The default search form template comes with a `data-autocomplete-source` attribute pointing to the
3145
`SuggestController` of this package. Fed with a `term` parameter via a `GET` request, it returns a
3246
JSON-encoded array of suggestions from Elasticsearch. These are fetched with a term suggester from
33-
`_all` field, i.e. "the fulltext index".
47+
the `_all` field, i.e. "the fulltext index".
3448

3549
These can be used to provide autocompletion on the search input using a JS library of your choice.
3650
In case you need to build the URI to the suggest controller yourself, this is what the form uses:

0 commit comments

Comments
 (0)