Would you mind sharing how could you use the ‘screen’ property so it ends up in your generated HTML? I’m trying to add a ‘width’ property that sets the div’s width.
according to the neos demo package and how bootstrap classes are implemented into multiple columns , I did the same with Zurb Foundation and added the screen property.
In roots.ts2:
##
# Adjust "MultiColumn" element to Zurb Foundation CSS classes
#
prototype(TYPO3.Neos.NodeTypes:MultiColumn) {
attributes.class = 'row'
columns.iterationName = 'multiColumnIteration'
}
##
# Adjust "MultiColumnItem" element to Zurb Foundation CSS classes
#
prototype(TYPO3.Neos.NodeTypes:MultiColumnItem) {
attributes.class = ${q(node).parent().property('screen') + '-' + String.split(q(node).parent().property('layout'), '-')[multiColumnIteration.index] + ' columns'}
}
Can someone tell me where I can modify the HTML template of the TwoColumn NodeType? I need to add a new class if a checkbox is checked. Here is the part in my YAML file under ‘Neos.NodeTypes:TwoColumn’:
Thank you @renewoerz for your helpful informations! I realized that it’s sufficient if I can access the property in the fusion.
Now I have the problem that I can’t access the property I set under ‘Neos.NodeTypes:TwoColumn’ because I would need it in my fusion under prototype(Neos.NodeTypes:MultiColumn).
Now my variable is always empty. How can I access to the value of the checkbox I set?
Neos.NodeTypes:MultiColumn has access to your property order (set for Neos.NodeTypes:TwoColumn) because it’s inheriting (in Packages/Application/Neos.NodeTypes/Resources/Private/Fusion/Root.fusion on line 84). You should have access to your property. And sorry about that “parent()”. You have only to use parent() if you want to access to your property from Neos.NodeTypes:MultiColumnItem.
So im really wondering what’s wrong. Im using that the exact same way for my custom grid.
Maybe you have to wait for a more experienced developer. For my understanding you did it the right way - i can’t help you here.