0
votes

I have a TYPO3 9.5.7 installation using fluid_styled_content. The image sizes for content elements can be set using the following TS constants:

styles.content.textmedia {
  maxW = 1170
  maxWInText = 385
}

Is it possible to set these values depending of the column (colPos) of a content element?

In a legacy TYPO3 6 installation with css_styled_content I was able to use the following TS, but it doesnt work anymore:

image.20.maxW.cObject = CASE
image.20.maxW.cObject {
  key.field = colPos
  default = TEXT
  default.value = 1170
  # Main column
  0 = TEXT
  0.value = 770
  # Right column
  2 = TEXT
  2.value = 770
  # Header
  3 = TEXT
  3.value = 1170
}
1

1 Answers

1
votes

You need to identify where your TS-constants are used in your TS-setup.
Either you build the CASE object there or you need to do it in your fluid.

Your CASE was in TS setup as CSC did (nearly) all the rendering with TS.
In FSC the rendering is done in fluid templates. There you also should have access to other fields like colPos and you could implement a logic. But that logic might be complicated (the implemantation of fluid switchis not very performant) and it should be easier to compute the correct sizes in the TS part where the constants are transferred to the TS setup and prepared for usage in fluid templates.