b13 / container

A TYPO3 Extension for creating custom nested content elements
GNU General Public License v2.0
167 stars 62 forks source link

Dataprocessing column children #110

Closed rupasix closed 3 years ago

rupasix commented 3 years ago

Hello! Can i somehow process children of column using "dataProcessing"? I imagine it would work like DatabaseProcessor example from docs: https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/ContentObjects/Fluidtemplate/DataProcessing.html#databasequeryprocessor

I tried something like that, without success:

tt_content.wrapper < lib.contentElement
tt_content.wrapper {
  templateName = Wrapper
  templateRootPaths.10 = EXT:awesome_ext/Resources/Private/Templates/Grid/
  dataProcessing {
    200 = B13\Container\DataProcessing\ContainerProcessor
    200 {
      colPos = 200
      as = children
      dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
      dataProcessing.10 {
        references.fieldName = image
        as = image
      }
    }
  }
}
achimfritz commented 3 years ago

this is not implemented on the ContainerProcessor. What is your Use Case for this requirement? why not use the renderedContent of the the children? There all dataProcessing of the Content Elements are applied. Required DataProcessors should connect to the Content Element direct, so rendering behaviour not matter if the Conent-Element is rendered inside a Container, or outside a Container.

rupasix commented 3 years ago

Hello!, Thanks for explanation. Sometimes I need to render inner content differently. Quick example, Accordion with bodytext and image:

I don't want to create additional tt_content[layout] for textpic and write additional conditions in overrided templates for FSC because that particular layout only make sense when pressed in that particular Container "Accordion". I also want to avoid manually register new CType, installing mask or other alternatives. Just simple accordion with one type of content. I hope you get my point.

cvholten commented 3 years ago

Hello, I would like to use this feature as well. So maybe you could merge this PR?