[FEATURE] Add stdWrap to config.pageTitleSeperator 23/18123/3
authorGeorg Ringer <georg.ringer@gmail.com>
Fri, 8 Feb 2013 15:55:53 +0000 (16:55 +0100)
committerBenjamin Mack <benni@typo3.org>
Sat, 16 Mar 2013 15:56:09 +0000 (16:56 +0100)
Add stdWrap to config.pageTitleSeperator

Change-Id: I88c2141167414b184f158d09f40df3aa36390b4a
Resolves: #35223
Releases: 6.1
Reviewed-on: https://review.typo3.org/18123
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
typo3/sysext/core/Classes/TypoScript/TemplateService.php

index 4c6a475..0afbef4 100644 (file)
@@ -1224,7 +1224,13 @@ class TemplateService {
                if ($pageTitle != '' && $siteTitle != '') {
                        $pageTitleSeparator = ': ';
                        if (isset($this->setup['config.']['pageTitleSeparator']) && $this->setup['config.']['pageTitleSeparator']) {
-                               $pageTitleSeparator = $this->setup['config.']['pageTitleSeparator'] . ' ';
+                               $pageTitleSeparator = $this->setup['config.']['pageTitleSeparator'];
+
+                               if (is_object($GLOBALS['TSFE']->cObj) && isset($this->setup['config.']['pageTitleSeparator.']) && is_array($this->setup['config.']['pageTitleSeparator.'])) {
+                                       $pageTitleSeparator = $GLOBALS['TSFE']->cObj->stdWrap($pageTitleSeparator, $this->setup['config.']['pageTitleSeparator.']);
+                               } else {
+                                       $pageTitleSeparator .= ' ';
+                               }
                        }
                }
                return $siteTitle . $pageTitleSeparator . $pageTitle;
@@ -1530,4 +1536,4 @@ class TemplateService {
 }
 
 
-?>
\ No newline at end of file
+?>