sitegeist/movealong

此包已被废弃且不再维护。未建议替代包。

通过Fusion渲染4xx状态页面

安装次数: 30,488

依赖者: 0

建议者: 0

安全: 0

星标: 9

关注者: 5

分叉: 5

开放性问题: 1

类型:neos-package

v5.0.0 2019-01-09 07:48 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
	}
}

作者与赞助商

此包的开发和公共发布得到了我们雇主http://www.sitegeist.de的大力赞助。

安装

Sitegeist.MoveAlong可通过Packagist获得。只需运行composer require sitegeist/movealong。我们使用语义版本控制,因此每次重大更改都会增加主版本号。

许可证

LICENSE文件