I am maintaining a project with individual document types. Now I had a problem and found a solution for it, but am not sure if it’s a good idea or bad practice.
We created a new document node “article folder” which can be placed anywhere in the document tree. And another document node, let’s call it “article”, which must not be placed anywhere else than inside “article folder”.
The point I’d like to discuss is, that I do not disable “article” as children in my individual abstract document type, but I’m doing this in
Neos.Neos:Document: constraints: nodeTypes: Vendor.Package:Document.Article: false
Vendor.Package:Document.ArticleFolder: superTypes: Vendor.Package:Document.Abstract.Document: true constraints: nodeTypes: Vendor.Package:Document.Article: true
Because my main goal is, that “article” will never be allowed inside any other page than in my “article folder”. At the moment, I could also disallow it in my abstract document node. But maybe if I would integrate any third party plugin in the future, which does not know about my abstract document node, it probably could bring new document types, which extend the default
Neos.Neos:Document - and with my solution, it automatically would not allow “article” below it.
I don’t know. That’s why I’m asking. I always read and hear to not modify default node types, but always extend them and build own abstract nodes.
Maybe any more experienced Neos user could give me some feedback, if I had a good or a bad idea?