Fluid-based error handler

The Fluid-based error handler is defined in EXT:core/Classes/Error/PageErrorHandler/FluidPageErrorHandler.php (GitHub).

Properties

The Fluid-based error handler has the properties Properties and Properties, and the following:

errorFluidTemplate
type

string

Example

EXT:my_sitepackage/Resources/Private/Templates/Sites/Error.html

The path to the Fluid template file. Path may be

  • absolute
  • relative to site root
  • starting with EXT: for files from an extension
errorFluidTemplatesRootPath
type

string [optional]

Example

EXT:my_sitepackage/Resources/Private/Templates/Sites/

The paths to the Fluid templates in case more flexibility is needed.

errorFluidPartialsRootPath
type

string [optional]

Example

EXT:my_sitepackage/Resources/Private/Partials/Sites/

The paths to the Fluid partials in case more flexibility is needed.

errorFluidLayoutsRootPath
type

string [optional]

Example

EXT:my_sitepackage/Resources/Private/Layouts/Sites/

The paths to Fluid layouts in case more flexibility is needed.

Example

Show the content of a Fluid template in case of an error with HTTP status 404:

config/sites/<some_site>/config.yaml | typo3conf/sites/<some_site>/config.yaml
errorHandling:
  - errorCode: 404
    errorHandler: Fluid
    errorFluidTemplate: 'EXT:my_sitepackage/Resources/Private/Templates/Sites/Error.html'
    errorFluidTemplatesRootPath: ''
    errorFluidLayoutsRootPath: ''
    errorFluidPartialsRootPath: 'EXT:my_sitepackage/Resources/Private/Partials/Sites/'
Copied!