From: Vincent Vanwaelscappel Date: Mon, 26 Aug 2019 13:59:24 +0000 (+0200) Subject: done #2976 @0:45 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d62a6b907d60abf1a76a518e4be939fc060bd7b5;p=cubist_cms-back.git done #2976 @0:45 --- diff --git a/src/app/Magic/Search.php b/src/app/Magic/Search.php index 0c298ed..45ff298 100644 --- a/src/app/Magic/Search.php +++ b/src/app/Magic/Search.php @@ -78,6 +78,7 @@ class Search $short_title = $meta->getAttribute('data-short-title'); $keywords = $meta->getAttribute('data-keywords'); $type = $meta->getAttribute('data-type'); + $breadcrumbs = $meta->getAttribute("data-breadcrumbs"); $body = [ 'short_title' => $short_title, @@ -85,6 +86,7 @@ class Search 'keywords' => $keywords, 'description' => $doc->select('meta[name="description"]')[0]['attributes']['content'], 'main' => $doc->getDOM()->saveHTML($doc->select('main', false)->item(0)), + 'breadcrumbs' => $breadcrumbs, 'type' => $type, ]; @@ -232,7 +234,8 @@ class Search $hits = []; foreach ($res['hits']['hits'] as $hit) { $hits[] = ['url' => $hit['_id'], - 'title' => $hit['_source']['short_title'] + 'title' => $hit['_source']['short_title'], + 'breadcrumbs' => json_decode($hit['_source']['breadcrumbs']), ]; }