Skip to content

Commit 2141608

Browse files
committed
Refactored last pr
1 parent 79a49d3 commit 2141608

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Block/Index.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ protected function _prepareLayout()
7070

7171
$this->addBreadcrumbs();
7272

73+
$this->pageConfig->addRemotePageAsset(
74+
$this->getUrl('htmlsitemap'),
75+
'canonical',
76+
['attributes' => ['rel' => 'canonical']]
77+
);
78+
7379
$title = $this->config->getConfig(self::XML_PATH_TO_PAGE_TITLE) ?: '';
7480
$metaTitle = $this->config->getConfig(self::XML_PATH_TO_PAGE_META_TITLE) ?: '';
7581
$metaDescription = $this->config->getConfig(self::XML_PATH_TO_PAGE_META_DESCRIPTION) ?: '';

Block/Type/Block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ protected function addBreadcrumbs()
9090
$breadcrumbsBlock->addCrumb(
9191
'htmlsitemap_' . $this->type,
9292
[
93-
'label' => __(ucfirst($this->type)),
94-
'title' => __(ucfirst($this->type)),
93+
'label' => __(ucfirst($this->getBlockTitle())),
94+
'title' => __(ucfirst($this->getBlockTitle())),
9595
]
9696
);
9797

0 commit comments

Comments
 (0)