[Neos] setting bootstrap wrap classes globally for all content elements

Dominic Garms djgarms at gmail.com
Thu Dec 5 10:24:55 CET 2013


Hello Guys,

I digg a bit deeper and try to create a Bootstrap package which adds 
content wrapper to all content types. First I created the NodeTypes.yaml:

'TYPO3.Neos:Content':
   ui:
     inspector:
       groups:
         bootstrapOptions:
           label: 'Bootstrap Options'
   properties:
     layoutBootstrap:
       type: string
       defaultValue: '0'
       ui:
         label: 'Bootstrap Layout'
         inspector:
           group: bootstrapOptions
           editor: Content/Inspector/Editors/SelectBoxEditor
           editorOptions:
             values:
               '0':
                 label: 'Default'
               '1':
                 label: 'Alert Success'
               '2':
                 label: 'Alert Info'
               '3':
                 label: 'Alert Warning'
               '4':
                 label: 'Alert Danger'

(....)

Now I am not sure how to proceed. I found prototype(TYPO3.Neos:Content) 
and there are already some attributes:

prototype(TYPO3.Neos:Content) < prototype(TYPO3.TypoScript:Template) {
	node = ${node}

	attributes = TYPO3.Neos:Attributes
	attributes.class = ''

I would like to wrap this into a div container with the specific classes 
from layoutBootstrap or add this into attributes.class. I am not sure 
how the syntax would look like, is it possible to set a wrap with CASE 
like former TypoScript?

Thanks for reading,

Dominic



More information about the Neos mailing list