Bug #80412
closedAPI Based content element registration is not compatible with fluid_styled_content.
100%
Description
I stumbled over an inconsistency in the frontend rendering definitions. This time it’s the API based registration of content elements with `Extbase` and `addPItoST43`.
Problem is that fluid_styled_content and css_styled_content have different needs for structuring the typoscript definitions for content element rendering when it comes to user functions.
The generated structure is always more or less the same for now.
```
tt_content.myce = COA
tt_content.myce {
10 =< lib.stdheader
20 =< plugin.myContent
}
```
This means that a rendering the header relies hardly on the existence of lib.stdheader, that is not available anymore in fluid_styled_content. Even if we would make it available again the wrapping divs, anchors, frames, spacebefore, spaceafter, linktotop etc. will still be missing for the registered content elements.
Unlike plugins, content elements do not have a single ctype that we can easily modify by adapting it later in the rendering definition of fluid_styled_content because we do not know the keys and blindly iterating over the typoscript and guessing what will happen could lead to very unwanted results and missbehavior.
We still have to support css_styled_content and fluid_styled_content we have to find a solution that fits both and is not heavily breaking. I´ve already tried a lot, and I think I have a working solution that fits all needs. Still we need to change stuff a bit.
Idea is that we utilize a new typoscript lib object that is existing in both css_styled_content and fluid_styled_content. Its more or less the same that we already have with `lib.fluidContent` but with a more generic naming like `lib.contentElement`. This would ensure it can be used across all rendering definitions without being too explicit about the naming, and can be adjusted to the needs of the content rendering definitions – that means a twig integration would not need to fiddle around with `lib.fluidContent` so we can avoid confusions now and probably do not need to change it again in the future.
Adjustments on PHP Side would be rather easy.
```
tt_content.myce = < lib.contentElement
tt_content.myce {
templateName = Generic
20 = < plugin.myContent
}
```
In short that means we just add `10 <= lib.stdheader` with the for css_styled_content, since COA has no use for templateName, it will simply be ignored and everything works as before. It will be no breaking here.
For fluid_styled_content we would rename `lib.fluidContent` to `lib.contentElement` and make `lib.fluidContent` available again as copy of `lib.contentElement` so that we avoid break custom content elements that currently utilize `lib.fluidContent`.
Worst thing that can happen here is that the typoscript constants for template path adjustments were ignored and lib.fluidContent was modified directly. Migration would be rename your adjustments from lib.fluidContent to lib.contentElement.
Please see review for this issue.
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52132
Updated by Gerrit Code Review over 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52132
Updated by Gerrit Code Review over 7 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52132
Updated by Gerrit Code Review over 7 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52132
Updated by Gerrit Code Review over 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52132
Updated by Gerrit Code Review over 7 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52132
Updated by Gerrit Code Review over 7 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52132
Updated by Anonymous over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a1b592f61f3d2bb3a2164cf363c3d815e9b7f8b3.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed
Updated by Mathias Brodala over 6 years ago
- Related to Task #84712: Drop compatability layer for lib.fluidContent added