My solution
I managed to find a working solution: However it seems overly complicated :(
What I did was override the List.html fluid Template for my plugins.
My solution in detail
TypoScript: Add fluid_styled_content partial paths to my view, Override the List Template for my plugins:
plugin.tx_myext.view.partialRootPaths < lib.contentElement.partialRootPaths
plugin.tx_myext.view.partialRootPaths.100 = EXT:myext/Resources/Private/Partials/
tt_content.list.templateRootPaths.50 = EXT:myext/Resources/Private/Templates/Override/
tt_content.list.templateName = TEXT
tt_content.list.templateName.stdWrap {
cObject = TEXT
cObject {
data = list_type
override.field = list_type
if.isInList.field = list_type
if.value = myext_plugin1,myext_plugin2
split {
token = myext_
1.current = 1
1.wrap = |
}
}
ifEmpty = List
}
EXT:myext/Resources/Private/Templates/Override/Plugin1.html: Overrides the default List Template, copy-paste of List.html without Layout.
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:cObject typoscriptObjectPath="tt_content.list.20.{data.list_type}" data="{data}" table="tt_content" />
</html>
EXT:myext/Resources/Private/Templates/MyController/View.html: Use Override/Default Layout
<f:layout name="Override/Default" />
<f:section name="Main" />
EXT:myext/Resources/Private/Layout/Override/Default.html: Is a copy of fluid_styled_content Default layout with hidden functionality.
....
<f:if condition="{hidden}">
<f:then>
</f:then>
<f:else>
....
Controller/MyController.php: Must add tt_content data (because header, header_layout, uid etc. are required)
$data = $this->configurationManager->getContentObject()->data;
$this->view->assign('data', $data);