sitegeist / fluid-components

Encapsulated frontend components with Fluid's ViewHelper syntax for TYPO3
https://fluidcomponents.sitegeist.de/
GNU General Public License v2.0
54 stars 21 forks source link

Do not fetch ContentViewhelper nodes recursively #157

Open sascha-egerer opened 3 months ago

sascha-egerer commented 3 months ago

Content ViewHelpers should only be fetched as direct children, not recursively. Fetching them recursively in templates will not work if components are nested, as slots of the inner component would also be applied to the outer component. Placing content in an if-else block, thus defining the content twice, will also not work and would no longer be possible with this change, which should prevent some headaches.

s2b commented 3 months ago

Not sure about the general state of the tests, but this seems to break a lot of them that test slot functionality.

sascha-egerer commented 3 months ago

Yes sorry it is broken. I’m working on it. I thought I did not yet open the PR. Will push a new version later and also add tests

sascha-egerer commented 3 months ago

@s2b I have added two new tests with nested components that are using slots. Maybe you can have a look and run the workflow