Prevent Div-Wrapping on Inline-Elements

Thank you,
now it rocks -> Source-Code without needless <div>-Tags

Solution for other reader:

Content Root.ts2 or included file

###
# overwrite the default Headline-Template: so unnecessary div-wrap will prevented
###
prototype(TYPO3.Neos.NodeTypes:Headline){
    templatePath = 'resource://VendorName.VendorSite/Private/Templates/NodeTypes/Headline.html'
}

#IMORTANT:
Don’t know why, but in resource://-path is not the real path (real path would be VendorName.VendorSite/Resources/Private/Templates/NodeTypes/Headline.html)
##Delete «Resources» in path!

Content in Headline.html

{namespace neos=TYPO3\Neos\ViewHelpers}
<f:if condition="{neos:rendering.inBackend()}">
    <f:then>
        <div{attributes -> f:format.raw()}>
        {neos:contentElement.editable(property: 'title')}
        </div>
    </f:then>
    <f:else>
        {title -> f:format.raw()}
    </f:else>
</f:if>
  • Inline-Editor works
  • div are gone
    ###Hope will help others!

Great stolle, thanks again!

1 Like