Replies: 5 comments
-
|
Most of the time each level of a structure really has only one entry type so being able to set it automatically or define a default value would really help. This would really make structures easier to explain to end users. |
Beta Was this translation helpful? Give feedback.
-
|
Hi. Did this ever get done? Looking for an option in entries field type that limits what can be selected to the top level ... |
Beta Was this translation helpful? Give feedback.
-
|
@kevadamson Check out the Level Entry Types plugin; it should work for your use case. |
Beta Was this translation helpful? Give feedback.
-
|
Think I might have posted this on the wrong issue. Was actually thinking in terms of the entries field type. So when the user tries to choose an entry, they can only choose one from a certain structure level - if that makes sense. I'm using the Level Entry Types plugin, in unison with the Child Me one. Works nicely for creating entries quickly in the right place with the right type. |
Beta Was this translation helpful? Give feedback.
-
|
Bumping this idea up! We've been running into this more recently where we want to restrict the parent/child relationships that are allowed. Authors frequently make mistakes when adding new entries and don't pay enough attention to the structure, requiring us to add more "type checking" in the templates when mapping over the entries. e.g.,
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions