Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to choose the entry type in a structure #33

Closed
janhendrickx opened this issue Sep 4, 2018 · 5 comments
Closed

Ability to choose the entry type in a structure #33

janhendrickx opened this issue Sep 4, 2018 · 5 comments

Comments

@janhendrickx
Copy link

A feature request:
Wouldn't it be handy to be able to select a specific entry type in a structure? So if you choose a structure, you get the entry types to select from too? Or something like that? I'd love to see that happen - I've bumped into a problem in the past (and now) in which that possibility would've saves me quite a lot of work.

@sebastian-lenz
Copy link
Owner

Interesting, so you basically want to filter structures (in general: sections) for specific entry types? The selection UI of craft has an attribute criteria which can filter the displayed entries, but I never tried to filter specific entry types with it and I also don't know whether it behaves well with structures. Also we would need some configuration option for this one. Maybe a more general solution that allows to alter the criteria is the way to go as it would allow other filter scenarios as well.

@janhendrickx
Copy link
Author

Yeah, something like that would work.
ATM I'm working on a site for a client that has a section which has 2 entry types. Now I'm building a matrix field in which the client can only choose 1 of those 2 entry types. This is because those 2 entry types only have one different, but very important field. And our client should only be given the possibility to choose en entry from that one entry.type since I need to show that one specific field in that matrix block. I'm still surprised that it still isn't a native feature in Craft itself, so I hope your plugin will makes this able (that way I can get the content of the selected entry via your linkField). It happened to me a few times before, so I would love to see that feature :-)

@sebastian-lenz
Copy link
Owner

Okay, the criteria is passed on to the underlying ElementQuery (https://github.com/craftcms/cms/blob/develop/src/elements/db/ElementQuery.php) of the displayed tree, but I don't see now criteria to filter by an entry type.

@jsunsawyer
Copy link

@sebastian-lenz Here's a plugin that I use to handle this for entry fields themselves.

https://github.com/nfourtythree/craft3-entriessubset

@sebastian-lenz
Copy link
Owner

I'll close this issue due to inactivity. I've decided to collect all feature requests in a markdown document, see https://github.com/sebastian-lenz/craft-linkfield/blob/master/WISHLIST.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants