File tree 1 file changed +12
-1
lines changed
app/code/Magento/Catalog/Block
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ public function getTitleSeparator($store = null)
54
54
*/
55
55
protected function _prepareLayout ()
56
56
{
57
+ $ title = [];
57
58
if ($ breadcrumbsBlock = $ this ->getLayout ()->getBlock ('breadcrumbs ' )) {
58
59
$ breadcrumbsBlock ->addCrumb (
59
60
'home ' ,
@@ -64,7 +65,6 @@ protected function _prepareLayout()
64
65
]
65
66
);
66
67
67
- $ title = [];
68
68
$ path = $ this ->_catalogData ->getBreadcrumbPath ();
69
69
70
70
foreach ($ path as $ name => $ breadcrumb ) {
@@ -73,7 +73,18 @@ protected function _prepareLayout()
73
73
}
74
74
75
75
$ this ->pageConfig ->getTitle ()->set (join ($ this ->getTitleSeparator (), array_reverse ($ title )));
76
+
77
+ return parent ::_prepareLayout ();
78
+ }
79
+
80
+ $ path = $ this ->_catalogData ->getBreadcrumbPath ();
81
+
82
+ foreach ($ path as $ name => $ breadcrumb ) {
83
+ $ title [] = $ breadcrumb ['label ' ];
76
84
}
85
+
86
+ $ this ->pageConfig ->getTitle ()->set (join ($ this ->getTitleSeparator (), array_reverse ($ title )));
87
+
77
88
return parent ::_prepareLayout ();
78
89
}
79
90
}
You can’t perform that action at this time.
0 commit comments