Created
September 12, 2019 12:56
-
-
Save stigfaerch/23595d8eab8ccc9b1eeb81d09c5df410 to your computer and use it in GitHub Desktop.
TYPO3 with fluid_styled_template - Implement defaultHeaderType from registers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- public/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html (date 1566293615000) | |
+++ public/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html (date 1566293615000) | |
@@ -38,7 +38,7 @@ | |
<f:if condition="{default}"> | |
<f:render partial="Header/Header" arguments="{ | |
header: header, | |
- layout: default, | |
+ layout: '{f:cObject(typoscriptObjectPath:\'lib.contentElement.cObjects.defaultHeaderType\')}', | |
positionClass: positionClass, | |
link: link}" /> | |
</f:if> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add this TypoScript to your configuration somewhere | |
lib.contentElement.cObjects { | |
defaultHeaderType = TEXT | |
defaultHeaderType { | |
data = register:defaultHeaderType | |
ifEmpty = {$styles.content.defaultHeaderType} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Header.html is a diff of the header partial of fluid_styled_content.
Better is of course to place the diffed Header.html in your own folder (exampel: EXT:myextension/Resources/Private/Extensions/FSC/Partials/), and then add the partial folder to your fluid_styled_content configuration:
lib.contentElement {
partialRootPath = EXT:myextension/Resources/Private/Extensions/FSC/Partials/
}