diff --git a/Neos.NodeTypes.ColumnLayouts/Resources/Private/Fusion/Root.fusion b/Neos.NodeTypes.ColumnLayouts/Resources/Private/Fusion/Root.fusion index 1753ad0c689..65a95d1191a 100644 --- a/Neos.NodeTypes.ColumnLayouts/Resources/Private/Fusion/Root.fusion +++ b/Neos.NodeTypes.ColumnLayouts/Resources/Private/Fusion/Root.fusion @@ -1,23 +1,39 @@ # Basic implementation of a flexible MultiColumn element, not exposed directly but inherited by all specific MultiColumn content elements -prototype(Neos.NodeTypes.ColumnLayouts:MultiColumn) < prototype(Neos.Neos:Content) { - templatePath = 'resource://Neos.NodeTypes.ColumnLayouts/Private/Templates/NodeTypes/MultiColumn.html' - layout = ${q(node).property('layout')} - attributes.class = ${'container columns-' + q(node).property('layout')} - columns = Neos.Fusion:Loop { - @context.columnLayout = ${q(node).property('layout')} - items = ${q(node).children('[instanceof Neos.Neos:ContentCollection]')} - itemRenderer = Neos.NodeTypes.ColumnLayouts:MultiColumnItem - itemName = 'node' - iterationName = 'columnIteration' - } +prototype(Neos.NodeTypes.ColumnLayouts:MultiColumn) < prototype(Neos.Neos:ContentComponent) { + layout = ${q(node).property('layout')} + + attributes = Neos.Fusion:DataStructure + attributes.class = ${'container columns-' + q(node).property('layout')} + # The following is used to automatically append a class attribute that reflects the underlying node type of a Fusion object, + # for example "neos-nodetypes-form", "neos-nodetypes-headline", "neos-nodetypes-html", "neos-nodetypes-image", "neos-nodetypes-menu" and "neos-nodetypes-text" + # You can disable the following line with: + # prototype(Neos.NodeTypes.ColumnLayouts:MultiColumn) { + # attributes.class.@process.nodeType > + # } + # in your site's Fusion if you don't need that behavior. + attributes.class.@process.nodeType = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))} + + columns = Neos.Fusion:Loop { + @context.columnLayout = ${q(node).property('layout')} + items = ${q(node).children('[instanceof Neos.Neos:ContentCollection]')} + itemRenderer = Neos.NodeTypes.ColumnLayouts:MultiColumnItem + itemName = 'node' + iterationName = 'columnIteration' + } + + renderer = afx` +