]> _ Git - cubist_cms-back.git/commitdiff
wip #3082 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2019 16:01:49 +0000 (18:01 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2019 16:01:49 +0000 (18:01 +0200)
src/app/Magic/Menu/Menu.php
src/app/Magic/Models/CubistMagicPageModel.php

index 864d62e8dfc2e05e16bacdd0cd98af811ec7ddff..0dd7b4e516c04045197adf5a49b63703705d5e0c 100644 (file)
@@ -204,7 +204,10 @@ class Menu extends BaseMenu
 
     public function getSearchBreadcrumbs()
     {
-        foreach ($this->get('breadcrumbs')->crumbMenu()->all() as $item) {
+        foreach ($this->get('breadcrumbs')->crumbMenu()->all() as $i => $item) {
+            if ($i === 0) {
+                continue;
+            }
             $search_breadcrumbs[] = ['title' => $item->title, 'url' => $item->url()];
         }
         return $search_breadcrumbs;
index 1bdcc4c251e4c2001de3c94236387ef0ee8f4b32..a2e46d95ecb89f407f44b561ba59de1df080eb1d 100644 (file)
@@ -18,6 +18,11 @@ class CubistMagicPageModel extends CubistMagicTranslatableModel
         $this->_menu();
     }
 
+    public function getSearchShortTitle()
+    {
+        return $this->getPageData()->get(['title', 'name']);
+    }
+
     public function _menu()
     {
         $tab = 'Menus';