2

Hello I need to change the Header Layout (Image below) in TYPO3. I am using the fluid templating system

enter image description here

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?

Daniel
  • 6,916
  • 2
  • 36
  • 47
RacoonOnMoon
  • 1,556
  • 14
  • 29

2 Answers2

2

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
}
RacoonOnMoon
  • 1,556
  • 14
  • 29
philmassa
  • 105
  • 8
  • Thanks for the quick response. I will check it out – RacoonOnMoon Apr 24 '17 at 09:08
  • You could also use the following constants to overwrite the partialRootPaths, etc without adding lines to TS Setup: styles.templates.templateRootPath, styles.templates.partialRootPath, styles.templates.layoutRootPath – Riccardo De Contardi Apr 24 '17 at 09:18
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

Geee
  • 2,217
  • 15
  • 30