Better NodeType Constraints

How to easily define what NodeTypes can be nested.

#Did you know that?

One essential part of defining NodeTypes is setting up the restrictions and constraints of which NodeTypes can or can't be nested within each other. An easily tangible example for this would be that gallery entries can only be created within galleries. 

The obvious solution would be to define a constraint in each individual page type to restrict gallery entries from being created directly within the page. This means that a single NodeType would require many changes in many different files. If you've run into this issue, you might find this alternative approach very useful.

#An elegant solution ...

Written by