Hide childNodes in «create New» Menu within NodeTypes.yaml

is it possible to hide an NodeType from «create New» Selection-PopUp? The nodeType should only be used as a childNode from a particular NodeType. It should not be used on its own.

I can’t find anything about using different in «create New» and «structure» menu. Maybe there is an other way to solve this demand.

Thanks für help

This is something I’d like to know too!

This can be done pretty easy using NodeType constraints!
The concept is explained in detail in the documentation.

With NodeType constraints you can limit the nodes an editor can select in the Crate New PopUp depending to the NodeType to which the editor wants to add content.

But this does not work if you want to add a NodeType programmatically (as autocreated Subnode) but don’t want to allow the editor to manually insert this NodeType, or does it?

Thanks Daniel,
maybe I misunderstood the documentation and still do. I use “constraints” to the particular ancestor to use the wished »auto«childNode only. So I set:

         type: 'Mh.MySite:MyAwesomeChild'
            'Mh.MySite:MyAwesomeChild': TRUE
             '*': FALSE

For me, constraints sets restrictions. And it works fine within the particular Ancestor->OnlyThisChild situation.

But I can’t find a simple restriction to use the child nowhere. like with yaml-phantasie:

            'Mh.MySite:MyAwesomeAncestor': TRUE
             '*': FALSE

Maybe I would have to set ‘*’ to all NodeTypes - so, no one can use the MyAwesomeChild NodeType. But than, I had to iterate trough all allowed NodeType from each possible Ancestor (Text, Header, Image, …).

I hope that’s not the [quote=“daniellienert, post:3, topic:999”]pretty easy
[/quote] way.

I can’t see the solution in the constraints-doc. Maybe you could switch on the light.

It’s been a while since you this topic was opened but I had the same question and I believe I found a solution so I’m posting it here for future reference. Using constraints on the top level node (or any level you prefer) is inherited by it’s children. So you need to only specify it once and your awesome node will not appear in the create menu:

      'Mh.Mysite:MyAwesomeNode': FALSE