Add Index Listener

This commit is contained in:
Jürgen Mummert
2025-12-22 21:34:11 +01:00
parent f41357bee5
commit ac1db3ff9a
3 changed files with 53 additions and 21 deletions
+5
View File
@@ -2,6 +2,7 @@
use MummertMedia\ContaoMeilisearchBundle\EventListener\IndexPageListener;
use MummertMedia\ContaoMeilisearchBundle\EventListener\MeilisearchPageMarkerListener;
use MummertMedia\ContaoMeilisearchBundle\EventListener\MeilisearchEventContextListener;
$GLOBALS['TL_HOOKS']['outputFrontendTemplate'][] = [
@@ -14,6 +15,10 @@ $GLOBALS['TL_HOOKS']['indexPage'][] = [
'onIndexPage'
];
$GLOBALS['TL_HOOKS']['parseFrontendTemplate'][] = [
MeilisearchEventContextListener::class,
'onParseFrontendTemplate',
];
if (!isset($GLOBALS['MEILISEARCH_MARKERS'])) {
$GLOBALS['MEILISEARCH_MARKERS'] = [];