stefkey
(Stefan Johänntgen)
June 13, 2016, 9:59am
1
Hi,
how can I add a class für text, image, headline and so on, but not for text, image, headline within a multicolumn-node?
I use this, but there is always the class within the Multicolumn Text
prototype(TYPO3.Neos.NodeTypes:Text) { attributes.class = 'container' } prototype(TYPO3.Neos.NodeTypes:Headline) { attributes.class = 'container' } prototype(TYPO3.Neos.NodeTypes:Image) { attributes.class = 'container' } prototype(TYPO3.Neos.NodeTypes:Multicolumn) { attributes.class = 'container' }
christianm
(Christian Müller)
June 13, 2016, 10:25am
2
I wonder why you would want to do that, because you can easily target them differently via CSS, but if you must you can nest prototypes to override properties of one prototype just if it is rendered within another:
prototype(TYPO3.Neos.NodeTypes:Multicolumn) {
attributes.class = 'container'
prototype(TYPO3.Neos.NodeTypes:Image) {
attributes.class = 'text-in-multicolumn'
}
}
stefkey
(Stefan Johänntgen)
June 13, 2016, 11:11am
3
Thanks a lot , great so easy! And with css I try
.container .container {
width: 100%;
}
And it’s work too! Thanks a lot! I think I love Neos.