typo3fluid-styled-contenttx-fluidcontent

fluidcontent: How to hide default Headline in TYPO3 8


In version 7 i could hide the headline in the Frontend with:

tt_content.fluidcontent_content.10 >

How can i do this in V8?

TYPO3 8.7.4 fluidcontent 5.2.0 flux 8.2.1


Solution

  • Basic explanation of Headers in Fluid Styled Content in TYPO3 8:

    The headline of each CType can be defined in their belonging Templates (Textmedia, Menu etc.) in a the Section "Header.html". This section is called by the main Layout "Default" and is looking for the Section "Header" in the belonging Template. If its not defined in the Template, it will use the partial "Header/All" - this is possible by using the "optional" parameter of the section viewhelper. See:

    <f:render section="Header" optional="true">
        <f:render partial="Header/All" arguments="{_all}"/>
    </f:render>
    

    Fluidcontent is a plugin which is using the "Generic.html" template which does NOT contain a section called "Header" so the "Header/All" partial is used for all plugins by default.

    Solution: Add the section to the Generic Template and check if its the plugin you want (fluidcontent)

    <f:section name="Header">
        <f:if condition="{data.CType} == 'fluidcontent_content'">
            <f:then>
                <f:comment>Dont output a header</f:comment>
            </f:then>
            <f:else>
                <f:comment>Use default header</f:comment>
                <f:render partial="Header/All" arguments="{_all}"/>
            </f:else>
        </f:if>
    </f:section>