Skip to content

Commit

Permalink
[!!!][TASK] Add sitetitle to pagetitle default configuration
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Josef Glatz committed Nov 28, 2018
1 parent f67e81c commit 7daeca6
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
@@ -1,4 +1,5 @@
<?php declare(strict_types = 1);
<?php
declare(strict_types = 1);

namespace JosefGlatz\Theme\Hooks\Frontend;

Expand All @@ -15,13 +16,16 @@ class TypoScriptHook
1 => [
'path' => 'SiteDefault',
'title' => 'Default Theme',
'sitetitle' => 'The TYPO3 Distribution',
'uid' => 'theme_default'
]
];

/**
* 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
*/
Expand Down Expand Up @@ -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']);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ config {
}
}

pageTitleFirst = 1
pageTitleSeparator = -
pageTitleSeparator.noTrimWrap = | | |

// E-Mail AntiSpam
# spamProtectEmailAddresses_atSubst = <span style="display:none">&bull;</span>@<span style="display:none">&bull;</span>
# spamProtectEmailAddresses = -3
Expand Down

0 comments on commit 7daeca6

Please sign in to comment.