---
title: "Feature: #96730 - Simplified ext:backend ModuleTemplate API"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-96730"
source: "Changelog/12.0/Feature-96730-SimplifiedExtbackendModuleTemplateAPI.rst"
typo3-version: "12.0"
typo3-major: 12
type: "feature"
issue: 96730
forge: "https://forge.typo3.org/issues/96730"
tags: ["Backend", "Fluid", "PHP-API", "ext:backend"]
rendered: "2026-09-24T21:45:06+00:00"
---

# Feature: #96730 - Simplified ext:backend ModuleTemplate API {#feature-96730}

See [forge#96730](https://forge.typo3.org/issues/96730)

## Description {#description}

Extensions that deliver own backend modules can now use the
`\TYPO3\CMS\Backend\Template\ModuleTemplate` class as
view for the 'body' part of the view and do not need to
instantiate an own view anymore.

The default document header of `ModuleTemplate` can be rendered
using a new Fluid layout named `Module`.

## Impact {#impact}

The standard code within backend module related controllers
looked like this until now:

```php
$moduleTemplate = $this->moduleTemplateFactory->create($request);
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setTemplateRootPaths(['EXT:my_extension/Resources/Private/Templates']);
$view->assign('aVariable', 'aValue');
$moduleTemplate->setContent($view->render('MyTemplate'));
return $this->responseFactory->createResponse()
    ->withHeader('Content-Type', 'text/html; charset=utf-8')
    ->withBody($this->streamFactory->createStream($moduleTemplate->renderContent($templateFileName)));
```

This can be streamlined as shown below. Template paths (Templates, Layouts, Partials)
are configured automatically, calling `renderResponse('SomeController/SomeAction')` will look for file
`Resources/Private/Templates/SomeController/SomeAction.html`. Templates can be
overridden by other extensions using page TSconfig, see [this changelog entry](https://docs.typo3.org/permalink/changelog:feature-96812)
for details on this.

```php
$moduleTemplate = $this->moduleTemplateFactory->create($request);
$moduleTemplate->assign('aVariable', 'aValue');
return $moduleTemplate->renderResponse('MyTemplate');
```

The HTML template should then reference the ModuleTemplate layout:

```html
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Module" />
<f:section name="Content">
    My body content
</f:section>
</html>
```
