Skip to content

Instantly share code, notes, and snippets.

@stigfaerch
Created September 12, 2019 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stigfaerch/23595d8eab8ccc9b1eeb81d09c5df410 to your computer and use it in GitHub Desktop.
Save stigfaerch/23595d8eab8ccc9b1eeb81d09c5df410 to your computer and use it in GitHub Desktop.
TYPO3 with fluid_styled_template - Implement defaultHeaderType from registers
--- 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>
#add this TypoScript to your configuration somewhere
lib.contentElement.cObjects {
defaultHeaderType = TEXT
defaultHeaderType {
data = register:defaultHeaderType
ifEmpty = {$styles.content.defaultHeaderType}
}
}
@stigfaerch
Copy link
Author

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/
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment