Skip to content

Instantly share code, notes, and snippets.

@mficzel
Last active November 30, 2018 14:01
Show Gist options
  • Save mficzel/ebb773e2bc2dc5a009291786001194f2 to your computer and use it in GitHub Desktop.
Save mficzel/ebb773e2bc2dc5a009291786001194f2 to your computer and use it in GitHub Desktop.
Ideas for status-rendering in the Neos-core as discussed by @grebaldi und @mficzel
#
# The rendering is implemented as special renderer for the error messages with a specific status code
#
# The fusion `error` path is rendered with only `site` and the `error` in the fusion context
#
error = Neos.Fusion:Case {
@context.notFoundNode = ${q(site).children('[uriPathSegment == 404]').get(0)}
404 {
condition = ${error.status == 404 && notFoundNode}
type = ${q(notFoundNode).property('_nodeType.name')}
}
default {
condition = true
renderer = Neos.Fusion:ErrorMessage {
title = ${error.message}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment