sitegeist / movealong
此包已被废弃且不再维护。未建议替代包。
通过Fusion渲染4xx状态页面
v5.0.0
2019-01-09 07:48 UTC
Requires
- neos/neos: ^3.3 || ^4.0 || dev-master
This package is auto-updated.
Last update: 2021-02-19 14:05:38 UTC
README
Sitegeist.MoveAlong
通过Fusion渲染4xx状态页面
配置
通过设置可以控制通过Fusion错误渲染处理的状态码。
Neos: Flow: error: exceptionHandler: renderingGroups: notFoundExceptions: matchingStatusCodes: [ 403, 404, 410 ]
实际渲染错误信息的Fusion代码。
#
# Main error matcher
#
error = Neos.Fusion:Case {
#
# Find the document to render in case of 404
#
@context.notFoundDocument = ${q(site).children('[instanceof Neos.Neos:Document]').filter('[uriPathSegment="404"]').get(0)}
#
# Custom matcher for 404 status
#
4xx {
@position = 'start'
condition = ${statusCode >= 400 && statusCode < 500 && notFoundDocument}
renderer = Neos.Fusion:Renderer {
@context.node = ${notFoundDocument}
@context.documentNode = ${notFoundDocument}
renderPath = '/root'
}
}
#
# Default rendering of classic error-message
#
default {
@position = 'end 9999'
condition = true
renderer = Sitegeist.MoveAlong:ErrorMessage
}
}
作者与赞助商
- Wilhelm Behncke - behncke@sitegeist.de
- Martin Ficzel - ficzel@sitegeist.de
此包的开发和公共发布得到了我们雇主http://www.sitegeist.de的大力赞助。
安装
Sitegeist.MoveAlong可通过Packagist获得。只需运行composer require sitegeist/movealong
。我们使用语义版本控制,因此每次重大更改都会增加主版本号。