diff --git a/src/Controller/FrontendModule/MeilisearchSearchController.php b/src/Controller/FrontendModule/MeilisearchSearchController.php new file mode 100644 index 0000000..91c1476 --- /dev/null +++ b/src/Controller/FrontendModule/MeilisearchSearchController.php @@ -0,0 +1,24 @@ +meiliLimit ?: 50); + + $this->Template->meiliLimit = $limit; + } +} \ No newline at end of file diff --git a/src/Resources/contao/config/config.php b/src/Resources/contao/config/config.php index c6a85e3..ca91a03 100644 --- a/src/Resources/contao/config/config.php +++ b/src/Resources/contao/config/config.php @@ -17,3 +17,5 @@ $GLOBALS['TL_HOOKS']['indexPage'][] = [ 'onIndexPage', ]; +$GLOBALS['FE_MOD']['search']['meilisearch_search'] + = MummertMedia\ContaoMeilisearchBundle\Controller\FrontendModule\MeilisearchSearchController::class; diff --git a/src/Resources/contao/dca/tl_module.php b/src/Resources/contao/dca/tl_module.php new file mode 100644 index 0000000..986ca1b --- /dev/null +++ b/src/Resources/contao/dca/tl_module.php @@ -0,0 +1,19 @@ + &$GLOBALS['TL_LANG']['tl_module']['meiliLimit'], + 'inputType' => 'text', + 'default' => 50, + 'eval' => [ + 'rgxp' => 'digit', + 'mandatory' => true, + 'tl_class' => 'w50', + ], + 'sql' => "int(10) unsigned NOT NULL default 50", +]; \ No newline at end of file diff --git a/src/Resources/contao/languages/de/modules.php b/src/Resources/contao/languages/de/modules.php new file mode 100644 index 0000000..5767e2a --- /dev/null +++ b/src/Resources/contao/languages/de/modules.php @@ -0,0 +1,7 @@ + +