-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there plans to integrate the new Core Content Blocks Registry / TcaGenerator to set TCA Felds with YAML? #546
Comments
@Kleini13 You are on the right track. And indeed, this is already possible to a certain extent.
This way the ContainerPreviewRenderer from EXT:container will kick in and render the grids in the backend. That's it. From here on you have full control over the Container fields. You can even define FlexForm configuration, which is oftentimes needed in YAML (No XML anymore!). Icon (no need to register it anymore) and frontend template are handled by Content Blocks in one place. TODO: For this to work even easier, everything should be defined at one place, instead of 3. It would make sense to have it all in Content Blocks YAML. This means CB has to define a new type "Container" (special Content Element type), which holds the Container configuration. There is no API for this yet, but it's on my mental list. Could be added as an extension. On the other side, Container has to provide an API to register Container configuration without simultanously registering a new Content Element in TCA (see example above). I hope we can work together to bring these extensions closer together (because they should!). This would even more separate concerns -> Content Blocks for Content Element definitions and Container for Configuration and backend rendering of grids. |
HI @nhovratov, thank you for the very quick response and explanation. I hope the API has a high priority on your mental list. If I can be of any help, tell me ;-) Until then, I'll try your 3 step solution. |
It's great to see these efforts. I have already successfully combined content blocks and containers in a similar way in a customer project without this description. I would love to be able to control the container behaviour directly in the content block yaml in the future. |
Of course I am more than happy to get help. For myself I don't know when I will be working on this feature. But in case you want to kickstart it, you can contact me on Slack. I will give you the information you need. |
It works like a charm! |
It should work without the backend-preview.html. Just delete it and the preview renderer from Container will kick in. |
@nhovratov You are right. It is not taking the backend-preview.html anyways. But what do I have to do if I want to overwrite the b13/container/Resources/Private/Templates/Grid.html with my own backend preview? |
Just had a quick look: This event looks handy:
|
Here the code if you want to have a different "GridTemplate" via setGridTemplate:
|
3,: Mmh so I leave all the typoscript rendering and Templates etc in one place then or also move them? |
3: You leave it like it used to be, with the exception that you don't need to specify any template paths anymore, as Content Blocks does this. |
It wold be a straight forward setup if the same strategy of config.yaml for creating TCA fields in EXT:Container would be hooked in as with EXT:ContentBlocks. As these two extensions are the replacement for EXT:GridElemenzts for most people.
Are there any plans from developers in this area?
https://docs.typo3.org/p/friendsoftypo3/content-blocks/main/en-us/YamlReference/FieldTypes/Index.html#field-types
Advantages:
(I am not a TYPO3 expert, so forgive me if I have not expressed myself clearly)
The text was updated successfully, but these errors were encountered: