diff --git a/src/Service/Cache/ElasticSearchCollection.php b/src/Service/Cache/ElasticSearchCollection.php index 357fb644..e4b7d724 100644 --- a/src/Service/Cache/ElasticSearchCollection.php +++ b/src/Service/Cache/ElasticSearchCollection.php @@ -496,7 +496,8 @@ public function findOneAndReplace(object|array $filter, object|array $replacemen $id = $filter['_id']; - $link = '/openwoo/'.trim(preg_replace('/[\s-]+/', '-', preg_replace('/[^a-z0-9\s-]/', '', strip_tags(strtolower($replacement['titel'])))), '-'); + $slug = trim(preg_replace('/[\s-]+/', '-', preg_replace('/[^a-z0-9\s-]/', '', strip_tags(strtolower($replacement['titel'])))), '-'); + $link = "/openwoo/$slug"; $doctype = 'OpenWOO'; @@ -516,6 +517,7 @@ public function findOneAndReplace(object|array $filter, object|array $replacemen 'excerpt' => $replacement['samenvatting'] ?? null, 'date' => $replacement['publicatiedatum'] ?? null, 'link' => $link, + 'slug' => $slug, 'content_filtered' => $replacement['beschrijving'] ?? null, ] );