Skip to content

Commit

Permalink
[TASK] Use altPageTitle instead of title in TitletagViewHelper
Browse files Browse the repository at this point in the history
Change-Id: Id949c0b8ae0300a5eb5c39fd16071a3c8167268f
Reviewed-on: http://review.typo3.org/39481
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
  • Loading branch information
georgringer committed May 12, 2015
1 parent 388af4a commit b548fa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/TitleTagViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TitleTagViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHe
public function render() {
$content = trim($this->renderChildren());
if (!empty($content)) {
$GLOBALS['TSFE']->page['title'] = $content;
$GLOBALS['TSFE']->page['altPageTitle'] = $content;
$GLOBALS['TSFE']->indexedDocTitle = $content;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/ViewHelpers/TitleTagViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function titleTagIsSet() {
$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue($title));

$viewHelper->render();
$this->assertEquals($title, $GLOBALS['TSFE']->page['title']);
$this->assertEquals($title, $GLOBALS['TSFE']->page['altPageTitle']);
$this->assertEquals($title, $GLOBALS['TSFE']->indexedDocTitle);
}
}

0 comments on commit b548fa7

Please sign in to comment.