Fluid-based error handler¶
The Fluid-based error handler is defined in EXT:core/Classes/Error/PageErrorHandler/FluidPageErrorHandler.php.
Properties¶
The Fluid-based error handler has the properties sitehandling-errorHandling_errorCode and sitehandling-errorHandling_errorHandler, 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:
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/'