I have a node type recipe
, which should only ever be created via a custom route that causes it to be linked to a parent food type, ie. if the user visits node/add/recipe/1
they will see a recipe
creation form that is linked to node 1
of type food
.
Now I want to disable the /node/add/recipe
route and prevent the recipe
node from appearing on node/add
. What's the best way to do this?
Note that this is not just a permissions issue - with my module it simply doesn't make sense for a recipe
type to be created without a food
that is linked to it, so visiting the node/add/recipe
page simply doesn't make sense, even for an administrator.