Philipp M
Philipp M

Reputation: 3498

TYPO3 - How to get the fluid style content classes of an element via typoscript in my custom element?

I recently changed form css_styled_content to fluid_styled_content. In my custom grid element I would like to render 'Content Element Layout' to this container. After switching to FSC it's not working anymore. How to get the fluid style content classes of an element via typoscript in my custom element? I render the element purely via typoscript like this:

Right now:

<div class="row test"> ... </div>

Via typoscript:

plugin.tx_myplugin.setup.my_1col {

  preCObject = LOAD_REGISTER
    preCObject {
        containerClasses.cObject = COA
        containerClasses.cObject {
            10 = TEXT
            10 {
                value = equal-height
                fieldRequired = flexform_equalHeight
                noTrimWrap = | ||
            }

            ...

            stdWrap.insertData = 1
            stdWrap.trim = 1
        }

        containerAttributes.cObject = COA
        containerAttributes.cObject {
            10 = TEXT
            10 {
                data = register: containerClasses
                noTrimWrap = | class="row test |"|
            }
        }
    }
..  
}   

How to get the fluid style content classes of an element via typoscript in custom element ... e.g.?:

Goal:

<div class="row frame frame-default frame-layout-0"></div>

Upvotes: 0

Views: 730

Answers (1)

Riccardo De Contardi
Riccardo De Contardi

Reputation: 2148

On TYPO3 version 8 those fields are frame_class and layout

Should something like this be sufficient?

plugin.tx_myplugin.setup.my_1col{
 stdWrap.wrap= <div class="frame frame-{field:frame_class} frame-layout-{field:layout}">|</div>
 insertData=1
}

Upvotes: 2

Related Questions