diff --git a/DistributionPackages/Neos.DocsNeosIo/Migrations/ContentRepository/Version20230915114256.yaml b/DistributionPackages/Neos.DocsNeosIo/Migrations/ContentRepository/Version20230915114256.yaml new file mode 100644 index 00000000..5249db69 --- /dev/null +++ b/DistributionPackages/Neos.DocsNeosIo/Migrations/ContentRepository/Version20230915114256.yaml @@ -0,0 +1,18 @@ +up: + comments: 'Changes the NodeType of the Page not found page to the newly introduced 404 document type' + migration: + - + filters: + - + type: NodeName + settings: + nodeName: 'Page not found' + transformations: + - + type: ChangeNodeType + settings: + newType: Neos.DocsNeosIo:Document.404 + + +down: + comments: 'No down migration available' diff --git a/DistributionPackages/Neos.DocsNeosIo/NodeTypes/Document/404.yaml b/DistributionPackages/Neos.DocsNeosIo/NodeTypes/Document/404.yaml new file mode 100644 index 00000000..a7050295 --- /dev/null +++ b/DistributionPackages/Neos.DocsNeosIo/NodeTypes/Document/404.yaml @@ -0,0 +1,25 @@ +'Neos.DocsNeosIo:Document.404': + search: + fulltext: + enable: false + childNodes: + main: + type: 'Neos.Neos:ContentCollection' + constraints: + nodeTypes: + '*': false + 'Neos.DocsNeosIo:Content.Text': true + + superTypes: + 'Neos.Neos:Document': true + 'Neos.Seo:NoindexMixin': true + 'Neos.DocsNeosIo:Mixin.HideSeo': true + ui: + label: '404' + icon: 'fas fa-exclamation-triangle' + properties: + _hiddenInIndex: + defaultValue: true + ui: + inspector: + group: null diff --git a/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Fusion/Document/404/404.fusion b/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Fusion/Document/404/404.fusion new file mode 100644 index 00000000..abcd0fbb --- /dev/null +++ b/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Fusion/Document/404/404.fusion @@ -0,0 +1,11 @@ +prototype(Neos.DocsNeosIo:Document.404) < prototype(Neos.DocsNeosIo:Document.AbstractPage) { + body.navCollection = ${q(node).find('main').children()} + body.content = Neos.Fusion:Component { + main = Neos.Neos:ContentCollection { + nodePath = 'main' + } + renderer = afx` + {props.main} + ` + } +} diff --git a/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Fusion/Error/NotFound.fusion b/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Fusion/Error/NotFound.fusion index ce5a0f4b..661ab8fc 100644 --- a/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Fusion/Error/NotFound.fusion +++ b/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Fusion/Error/NotFound.fusion @@ -3,7 +3,7 @@ # for exceptions with 4xx status code # error { - @context.notfoundDocument = ${q(site).children('[uriPathSegment = "404"]').get(0)} + @context.notfoundDocument = ${q(site).find('[instanceof Neos.DocsNeosIo:Document.404]').get(0)} 4xx { @position = 'start' diff --git a/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Translations/de/NodeTypes/Mixin/MenuItem.xlf b/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Translations/de/NodeTypes/Mixin/MenuItem.xlf new file mode 100644 index 00000000..d1372c4c --- /dev/null +++ b/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Translations/de/NodeTypes/Mixin/MenuItem.xlf @@ -0,0 +1,11 @@ + + + + + + Hide from main menu + Im Hauptmenü verstecken + + + + diff --git a/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Translations/en/NodeTypes/Mixin/MenuItem.xlf b/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Translations/en/NodeTypes/Mixin/MenuItem.xlf new file mode 100644 index 00000000..62c34ca3 --- /dev/null +++ b/DistributionPackages/Neos.DocsNeosIo/Resources/Private/Translations/en/NodeTypes/Mixin/MenuItem.xlf @@ -0,0 +1,10 @@ + + + + + + Hide from main menu + + + +