From 7daeca6a6be6da576e837cbbaec5bea79ad869ea Mon Sep 17 00:00:00 2001 From: Josef Glatz Date: Wed, 28 Nov 2018 06:17:58 +0100 Subject: [PATCH] [!!!][TASK] Add sitetitle to pagetitle default configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a first step: the sitetitle is configured within the "sys_template" hook, like in the past in sys_template.sitetitle. This sitetitle is always added to the page title as suffix with the following prefix: " - " 2nd step: Add a temp. extension to extend the site configuration language to maintain it within the site configuration yaml file 3rd step (hopefully): Stick to TYPO3 core solution v10 would cool: https://review.typo3.org/#/c/57625/ and upcoming patches ツ Related: #371 --- .../ext/theme/Classes/Hooks/Frontend/TypoScriptHook.php | 7 ++++++- .../Configuration/TypoScript/Base/Config.setup.typoscript | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/web/typo3conf/ext/theme/Classes/Hooks/Frontend/TypoScriptHook.php b/app/web/typo3conf/ext/theme/Classes/Hooks/Frontend/TypoScriptHook.php index b13ed197..a15ef731 100644 --- a/app/web/typo3conf/ext/theme/Classes/Hooks/Frontend/TypoScriptHook.php +++ b/app/web/typo3conf/ext/theme/Classes/Hooks/Frontend/TypoScriptHook.php @@ -1,4 +1,5 @@ - [ 'path' => 'SiteDefault', 'title' => 'Default Theme', + 'sitetitle' => 'The TYPO3 Distribution', 'uid' => 'theme_default' ] ]; @@ -22,6 +24,8 @@ class TypoScriptHook /** * Hooks into TemplateService to load the default TS * + * This hook is used as an alternative to a sys_template record within the database. + * * @param array $parameters * @param \TYPO3\CMS\Core\TypoScript\TemplateService $parentObject */ @@ -49,6 +53,7 @@ public function addCustomTypoScriptTemplate($parameters, $parentObject) 'static_file_mode' => 3, 'uid' => $configuration['uid'], 'title' => $configuration['title'], + 'sitetitle' => $configuration['sitetitle'], ]; $parentObject->processTemplate($row, 'sys_' . $row['uid'], $configurationPageId, 'sys_' . $row['uid']); } diff --git a/app/web/typo3conf/ext/theme/Configuration/TypoScript/Base/Config.setup.typoscript b/app/web/typo3conf/ext/theme/Configuration/TypoScript/Base/Config.setup.typoscript index d7134ce8..59ec3e1a 100644 --- a/app/web/typo3conf/ext/theme/Configuration/TypoScript/Base/Config.setup.typoscript +++ b/app/web/typo3conf/ext/theme/Configuration/TypoScript/Base/Config.setup.typoscript @@ -54,6 +54,10 @@ config { } } + pageTitleFirst = 1 + pageTitleSeparator = - + pageTitleSeparator.noTrimWrap = | | | + // E-Mail AntiSpam # spamProtectEmailAddresses_atSubst = @ # spamProtectEmailAddresses = -3