Skip to content

Commit

Permalink
Use pageTitle as title (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
havutcuoglu authored Jul 28, 2020
1 parent 3c3513c commit 8e695e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ protected function generateTemplateArray(NavigationItem $item, UrlParameterBag $
'link' => $item->getLabel(),
'subitems' => '',
'href' => specialchars($item->getHref($urlParameterBag)),
'pageTitle' => strip_tags($item->getTitle()),
'title' => strip_tags($item->getTitle()),
'pageTitle' => strip_tags($item->getPageTitle()),
'accesskey' => '',
'tabindex' => '',
'nofollow' => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,12 @@ public function getTitle()
{
return $this->targetPage ? $this->targetPage->title : $this->rootPage->title;
}

/**
* @return string
*/
public function getPageTitle()
{
return $this->targetPage ? $this->targetPage->pageTitle : $this->rootPage->pageTitle;
}
}

0 comments on commit 8e695e4

Please sign in to comment.