I have an issue with correct rendering views in TYPO3 (backend extension) after upgrade from version 12 to 13.
In changelog I see information about deleted deprecated methods and potential new way to render views - class ModuleTemplate
can be used to render correct response (source: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-96730-SimplifiedExtbackendModuleTemplateAPI.html). I use it in my controllers, but unfortunately views are rendered without included TYPO3 module layout (Module.html
). This leads to issues with basic styling and scrollbar: the scrollbar itself is missing and content is not accessible on the backend as it's not possible to scroll down or up.
It seems that for some reason basic html wrapper from modules is not used: before the whole view was wrapped by div with class module
, example: <div class="module {moduleClass}" data-module-id="{moduleId}" data-module-name="{moduleName}">
.
Actually I use solution from this site:
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-96730-SimplifiedExtbackendModuleTemplateAPI.html
$moduleTemplate = $this->moduleTemplateFactory->create($request);
$moduleTemplate->assign('aVariable', 'aValue');
return $moduleTemplate->renderResponse('MyTemplate');
I pass variables into view and later render response with my fluid template and it doesn't work properly.
What I did:
<f:layout name="Module"/>
into my views - layout is still not usedTo summarize: views are rendered with all required variables, but basic styling with scrollbar are missing.
I would take a look at the typo3-cms-backend extension.
Maybe take a look at:
and
EDIT:
In your case you might take a look at:
This template also uses the module layout. Perhaps your module does not find the Layout Template.
You could try to copy the module layout template to your extensions Resources/Layout
folder:
https://github.com/TYPO3-CMS/backend/blob/v13.1.1/Resources/Private/Layouts/Module.html
If that works you could either use it that way or add the correct layout-path to your extension.