meilisearch/Configuration/TypoScript/Examples/Suggest/setup.typoscript
2021-04-17 21:20:54 +02:00

49 lines
1.3 KiB
Plaintext

# Enable search field autocomplete/suggest
# Ajaxify the suggest/results
tx_meilisearch_suggest = PAGE
tx_meilisearch_suggest {
typeNum = 7384
config {
disableAllHeaderCode = 1
xhtml_cleaning = 0
admPanel = 0
additionalHeaders.10.header = Content-type: application/javascript
no_cache = 0
debug = 0
}
10 = USER
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Meilisearch
pluginName = pi_suggest
vendorName = WapplerSystems
controller = Suggest
action = suggest
}
}
[globalString = GP:tx_meilisearch|callback = ]
tx_meilisearch_suggest.config.additionalHeaders.10.header = Content-type: application/json
[global]
# Enable suggest
plugin.tx_meilisearch {
suggest = 1
suggest {
numberOfSuggestions = 10
suggestField = spell
}
}
# Load js files
page.includeJSFooterlibs {
meilisearch-jquery = EXT:meilisearch/Resources/Public/JavaScript/JQuery/jquery.min.js
meilisearch-autocomplete = EXT:meilisearch/Resources/Public/JavaScript/JQuery/jquery.autocomplete.min.js
meilisearch-suggest = EXT:meilisearch/Resources/Public/JavaScript/suggest_controller.js
}
page.includeCSS {
meilisearch-suggest = EXT:meilisearch/Resources/Public/StyleSheets/Frontend/suggest.css
}