Skip to content

Commit

Permalink
Merge pull request #1057 from magento-engcom/2.1-develop-prs
Browse files Browse the repository at this point in the history
Public Pull Requests:
#9324
  • Loading branch information
Oleksii Korshenko authored Apr 22, 2017
2 parents 9bae15f + 25fb4f5 commit 97a0832
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/code/Magento/Catalog/Block/Breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function getTitleSeparator($store = null)
*/
protected function _prepareLayout()
{
$title = [];
if ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs')) {
$breadcrumbsBlock->addCrumb(
'home',
Expand All @@ -64,7 +65,6 @@ protected function _prepareLayout()
]
);

$title = [];
$path = $this->_catalogData->getBreadcrumbPath();

foreach ($path as $name => $breadcrumb) {
Expand All @@ -73,7 +73,18 @@ protected function _prepareLayout()
}

$this->pageConfig->getTitle()->set(join($this->getTitleSeparator(), array_reverse($title)));

return parent::_prepareLayout();
}

$path = $this->_catalogData->getBreadcrumbPath();

foreach ($path as $name => $breadcrumb) {
$title[] = $breadcrumb['label'];
}

$this->pageConfig->getTitle()->set(join($this->getTitleSeparator(), array_reverse($title)));

return parent::_prepareLayout();
}
}

0 comments on commit 97a0832

Please sign in to comment.