This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Restrict entry types by parent/child relationship in structure section #1628
Labels
enhancement
improvements to existing features
Creating a new issue for this, as per @brandonkelly in #853 ...
Would be great if there were a per-entry-type setting within a structure section to restrict the allowable entry types of children (or restrict entry types so they can only be children of certain parent entry types). Would offer similar benefits to restricting entry type by level in the hierarchy, but is conceptually simpler and offers more flexibility.
For example, if I have an employee directory and my entry types are "Employee" and "Department", I want each employee to be in 1 and only 1 department. I could set the section to only allow "Department" entry types at the top-level, then set the "Department" entry type to only allow "Employee" entries as children. (Or maybe it's vice-versa... saying that an entry type can only be a child of some other entry type, so a "Department" cannot be a child of any other type, and "Employee" can only be a child of "Department" entry type).
But if I have a more complex structure (to take an example from a real project I'm working on): I've got product categories and products. Categories can be nested, but products must be under 1 category (and a category either has sub-categories or sub-products, but not both). So I could have 3 entry types in this section: "category that has subcategories", "category that has products", and "product", then set each of them to only allow the children of the proper type (and set "product" to not allow child entries at all). In this way I can have an arbitrarily-nested structure (I don't have to set it to a specific number of levels) but also enforce the hierarchy I want.
The text was updated successfully, but these errors were encountered: