问题
Hello I need to change the Header Layout (Image below) in TYPO3. I am using the fluid templating system
Also I found the html file where I can change it. The original path to the file is: /typo3_src-7.6.16/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header
But if I change it right there my TYPO3 is not updatable. Can I change the file somehow that TYPO3 is still updatable?
回答1:
it's possbile that typo3 stays updatable. You have to create the original path in your file-structure:
/httpdocs/fileadmin/Templates/fluid_styled_content/Resources/Private/Partials/Header
You can simply copy the Header.html and paste it in there. In the Header.html you can edit the switch-case an create new Layouts.
Then yo have to edit your template in the backend. You can do this by clicking on "Template" and then "Edit the whole template record". Include the following snippet in "Setup":
lib.fluidContent.partialRootPaths.100 = fileadmin/Templates/fluid_styled_content/Resources/Private/Partials/
After you created the path you have to edit the page properties in the backend. Under "Resources" > "Page TSConfig" you can create your label for the backend, e.g.:
TCEFORM.tt_content.header_layout {
addItems.6 = Slider-Title
}
回答2:
You have to override TCAFORM to change the header layout.
TCEFORM.tt_content {
header_layout {
config {
default = 2
}
altLabels {
# 0 = Default ( = h2)
1 = H1
2 = H2
3 = H3
4 = H4
5 = H5
}
addItems{
6 = H6
}
}
}
Place given ts in the PageTSconfig to override label.
Ref.link : http://www.typo3wizard.com/en/snippets/cool-stuff-typoscript/using-the-layout-field-in-tt-content-and-pages.html
来源:https://stackoverflow.com/questions/43583734/how-can-i-change-the-header-layout-in-typo3-add-some-wrap-divs