Private

This folder contains resources that are needed when rendering a page but are not needed directly by the browser. This includes:

  • Fluid templates
  • Language files
  • Files for the compilation of assets like SCSS or TypeScript

Fluid templates in the folder Resources/Private

Fluid templates are commonly stored in a folder called Resources/Private/Templates. The concrete location of templates is configurable via:

Common locations for Fluid templates in TYPO3 extensions with plugins:

Resources/Private/Templates/[ControllerName]/[ActionName].html

[ActionName].html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/Templates/[ControllerName]/[ActionName].html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/Templates/[ControllerName]/[ActionName].html

Folder Templates often contains the Fluid templates for a TYPO3 extensions plugins. In Extbase they are stored in a folder with the name of the controller class (without Controller ending), for example the NewsController.php has the template for action "view" in /Resources/Private/Templates/News/View.html. Non-Extbase controllers can decide on how to use this folder.

Resources/Private/Partials/SomePartials.html

SomePartials.html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/Partials/SomePartials.html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/Partials/SomePartials.html

Folder Partials often contains the Fluid partials for a TYPO3 extension. These can be included via the Render ViewHelper <f:render> into the main Fluid template.

Resources/Private/Layouts/SomeLayout.html

SomeLayout.html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/Layouts/SomeLayout.html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/Layouts/SomeLayout.html

Folder Layouts often contains the Fluid layouts for a TYPO3 extension. These can be included via the Layout ViewHelper <f:layout> into the main Fluid template.

Common Fluid template locations for the page view in site packages

Commonly site package in TYPO3 v13 and above use the PAGEVIEW TypoScript object to display the HTML page output. They have one folder, commonly PageView or Templates in folder Resources/Private with the subfolders Pages, Partials and Layouts (they cannot be renamed).

Resources/Private/PageView/Pages/MyPageLayout.html

MyPageLayout.html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/PageView/Pages/MyPageLayout.html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/PageView/Pages/MyPageLayout.html

This folder contains one Fluid template for each page layout defined in the site package. See Site package Tutorial, the page view.

Resources/Private/PageView/Partials/SomePartials.html

SomePartials.html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/PageView/Partials/SomePartials.html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/PageView/Partials/SomePartials.html

Folder Partials contains the Fluid partials used by the page view. These can be included via the Render ViewHelper <f:render> into the page view template.

Resources/Private/PageView/Layouts/SomeLayout.html

SomeLayout.html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/PageView/Layouts/SomeLayout.html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/PageView/Layouts/SomeLayout.html

Folder Layouts often contains the Fluid layout(s) used by the page view. These can be included via the Layout ViewHelper <f:layout> into the page view template.

Common locations to override Fluid-Styled content elements

Templates to override or extend Fluid-Styled Content based content objects are typically stored in a folder called /Resources/Private/ContentElements. This needs to be configured via setting styles.templates.templateRootPath etc. to work. See also Site Package Tutorial: Overriding the default templates of content elements.

Resources/Private/ContentElements/Pages/SomeContentElement.html

SomeContentElement.html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/ContentElements/Pages/SomeContentElement.html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/ContentElements/Pages/SomeContentElement.html

This folder contains one Fluid template for each content element type defined in the site package.

Resources/Private/ContentElements/Partials/SomePartials.html

SomePartials.html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/ContentElements/Partials/SomePartials.html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/ContentElements/Partials/SomePartials.html

Typically overrides the Fluid-Styled Content partials.

Resources/Private/ContentElements/Layouts/Default.html

Default.html
Scope
extension
Path (Composer)
packages/my_extension/Resources/Private/ContentElements/Layouts/Default.html
Path (Classic)
typo3conf/ext/my_extension/Resources/Private/ContentElements/Layouts/Default.html

Overrides the default layout originally defined in vendor/typo3/cms-fluid-styled-content/Resources/Private/Layouts/Default.html. It is possible to define additional custom layouts that can be included via the Layout ViewHelper <f:layout> into content element templates.