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

Dominic Garms djgarms at gmail.com
Thu Dec 5 16:08:21 CET 2013


On 12/05/2013 05:49 PM, Dominique Feyer wrote:
> You can use processor for the wrapping. But I would prefer a new node type
> in this case.
> Le 5 déc. 2013 10:30, "Dominic Garms" <djgarms at gmail.com> a écrit :
>
>> 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
>>
>> _______________________________________________
>> Neos mailing list
>> Neos at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos
>>
Hi Deminique,

do you have a link where I could see some samples? I Never used any 
processors. I don't want to create a new NodeType, because all content 
elements schould get this bootstrap wrapping class. Its about simple 
wrapper like bordered box, alerts and some other layout. Additional 
visibility classes should getting set as well.

Cheers,
Dominic


More information about the Neos mailing list