Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
Be.container ViewHelper <f:be.container>
Deprecated since version 11.5
This backend module related ViewHelper mostly provides the same functionality as Be.pageRenderer ViewHelper <f:be.pageRenderer>, with the additional opportunity to render an empty doc header.
ViewHelper which allows you to create extbase based modules in the style of TYPO3 default modules.
Migration
When this ViewHelper is used to register additional backend module resources like CSS or JavaScript, Be.pageRenderer ViewHelper <f:be.pageRenderer> can be used as drop-in replacement.
If the ViewHelper is used to additionally render an empty ModuleTemplate, this part should be moved to a controller instead. Simple example:
$moduleTemplate->setContent($view->render());
return new HtmlResponse($moduleTemplate->renderContent());
Examples
Simple:
<f:be.container>your module content</f:be.container>
"your module content" wrapped with proper head & body tags. Default backend CSS styles and JavaScript will be included.
All options:
<f:be.container pageTitle="foo"
includeCssFiles="{0: '{f:uri.resource(path:\'Css/Styles.css\')}'}"
includeJsFiles="{0: '{f:uri.resource(path:\'JavaScript/Library1.js\')}', 1: '{f:uri.resource(path:\'JavaScript/Library2.js\')}'}"
addJsInlineLabels="{0: 'label1', 1: 'label2'}"
>
your module content
</f:be.container>
"your module content" wrapped with proper head & body tags.
Custom CSS file EXT:
and
JavaScript files EXT:
and
EXT:
will be loaded, plus some inline labels for usage in JS code.
Source code
Go to the source code of this ViewHelper: ContainerViewHelper.php (GitHub).
Arguments
The following arguments are available for <f:
:
pageTitle
-
- Type
- string
Title tag of the module. Not required by default, as BE modules are shown in a frame
includeCssFiles
-
- Type
- mixed
List of custom CSS file to be loaded
includeJsFiles
-
- Type
- mixed
List of custom JavaScript file to be loaded
addJsInlineLabels
-
- Type
- mixed
Custom labels to add to JavaScript inline labels
includeRequireJsModules
-
- Type
- mixed
List of RequireJS modules to be loaded
enableDocHeader
-
- Type
- boolean
Add an empty doc header