]> _ Git - cubist_cms-back.git/commitdiff
wait #3082 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2019 16:13:39 +0000 (18:13 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 Sep 2019 16:13:39 +0000 (18:13 +0200)
src/app/Magic/Menu/Menu.php

index 0dd7b4e516c04045197adf5a49b63703705d5e0c..8f66af882d49486ff8bf7155ce72de4bd3fd88b0 100644 (file)
@@ -204,8 +204,11 @@ class Menu extends BaseMenu
 
     public function getSearchBreadcrumbs()
     {
-        foreach ($this->get('breadcrumbs')->crumbMenu()->all() as $i => $item) {
-            if ($i === 0) {
+        $all = $this->get('breadcrumbs')->crumbMenu()->all();
+        $lastIndex = count($all )-1;
+        $search_breadcrumbs=[];
+        foreach ($all as $i => $item) {
+            if ($i === 0 || $i === $lastIndex) {
                 continue;
             }
             $search_breadcrumbs[] = ['title' => $item->title, 'url' => $item->url()];