From 087e96490f39467c647defbe8832e5c1c0bb1135 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Tue, 26 Sep 2023 23:37:33 +0200 Subject: [PATCH] FEATURE: `Neos.Neos:Site` NodeType --- Neos.Neos/Configuration/NodeTypes.Sites.yaml | 3 --- Neos.Neos/NodeTypes/Mixin/Document.yaml | 2 ++ Neos.Neos/NodeTypes/Mixin/Site.yaml | 10 ++++++++++ Neos.Neos/NodeTypes/Mixin/Sites.yaml | 11 +++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) delete mode 100644 Neos.Neos/Configuration/NodeTypes.Sites.yaml create mode 100644 Neos.Neos/NodeTypes/Mixin/Site.yaml create mode 100644 Neos.Neos/NodeTypes/Mixin/Sites.yaml diff --git a/Neos.Neos/Configuration/NodeTypes.Sites.yaml b/Neos.Neos/Configuration/NodeTypes.Sites.yaml deleted file mode 100644 index fa2556e5904..00000000000 --- a/Neos.Neos/Configuration/NodeTypes.Sites.yaml +++ /dev/null @@ -1,3 +0,0 @@ -'Neos.Neos:Sites': - superTypes: - 'Neos.ContentRepository:Root': true diff --git a/Neos.Neos/NodeTypes/Mixin/Document.yaml b/Neos.Neos/NodeTypes/Mixin/Document.yaml index 41d37e48cea..f00b1f0dd85 100644 --- a/Neos.Neos/NodeTypes/Mixin/Document.yaml +++ b/Neos.Neos/NodeTypes/Mixin/Document.yaml @@ -11,6 +11,8 @@ constraints: nodeTypes: '*': false + # explicitly disallow to create a homepage below a regular document + 'Neos.Neos:Site': false 'Neos.Neos:Document': true postprocessors: 'CreationDialogPostprocessor': diff --git a/Neos.Neos/NodeTypes/Mixin/Site.yaml b/Neos.Neos/NodeTypes/Mixin/Site.yaml new file mode 100644 index 00000000000..c2d38ef77a3 --- /dev/null +++ b/Neos.Neos/NodeTypes/Mixin/Site.yaml @@ -0,0 +1,10 @@ +# +# Abstract NodeType for a Neos.Neos site. +# Each homepage must extend this NodeType. +# Nodes of this type must be direct children of the Neos.Neos:Site Root +# and must not be created at any other place in the tree. +# +'Neos.Neos:Site': + abstract: true + superTypes: + 'Neos.Neos:Document': true diff --git a/Neos.Neos/NodeTypes/Mixin/Sites.yaml b/Neos.Neos/NodeTypes/Mixin/Sites.yaml new file mode 100644 index 00000000000..229957b03dd --- /dev/null +++ b/Neos.Neos/NodeTypes/Mixin/Sites.yaml @@ -0,0 +1,11 @@ +# +# Root NodeType for a Neos.Neos content repository. +# Any Neos Site node must be its direct child. +# +'Neos.Neos:Sites': + superTypes: + 'Neos.ContentRepository:Root': true + constraints: + nodeTypes: + '*': false + 'Neos.Neos:Site': true