TypoScript with innerWrap and section_frame doesn't work anymore

Viewed 481

We are reworking old TYPO3 projects and my problem is that the following condition doesn't work anymore, and nothing gets wrapped:

tt_content.stdWrap.innerWrap.cObject = CASE
tt_content.stdWrap.innerWrap.cObject {
  key.field = section_frame
  100 = TEXT
  100.value = <div id="c{field:uid}" class="hotel">|</div>
}

So, section_frame is deprecated and got replaced by frame_class which would result in:

tt_content.stdWrap.innerWrap.cObject = CASE
tt_content.stdWrap.innerWrap.cObject {
  key.field = frame_class
  100 = TEXT
  100.value = <div id="c{field:uid}" class="hotel">|</div>
}

But that doesn't work either. What else has to be changed to work with TYPO3 9.5 and fluid_styled_content?

2 Answers

Since the classes are not assigned by a numeric value but directly as a class string, you don't need any condition for that, but you can use the string data instead.

tt_content.stdWrap.innerWrap.cObject >
tt_content.stdWrap.innerWrap.cObject = TEXT
tt_content.stdWrap.innerWrap.cObject {
  insertData = 1
  value = <div id="c{field:uid}" class="{field:frame_class}">|</div>
}

Your TypoScript is related to Css_styled_content. It cannot be integrated into Fluid_styled_content.

In your site package you have to override the default layout file of Fluid_styled_content and add an inline fluid condition at the appropriate place. Something like:

`{f:if( condition: data.frameClass, then: ' {data.frameClass}' )}

Related