Element Relationship field #15976
Replies: 2 comments 4 replies
-
Could you maybe use the new link field for this? Or is it missing some functionality you need? |
Beta Was this translation helpful? Give feedback.
-
Weeellllll.... it's a Craft 4 site. 😅 So I don't actually know yet; I'm about to begin working on my first Craft 5 site imminently, but this client's site is not that. ¯\_(ツ)_/¯ I will say that in this instance, all I'd need is the ability to select various elements from various sources; if the link field also shows fields for the link text, an "Open in new tab" checkbox, etc — all that's extraneous to this use-case. Can the new Link field return linked-to elements AS elements? I.e. I can continue to query them to fetch their custom Main Image and Tag Line fields? No difference in performance doing that via the Link field vs via a Relation field? |
Beta Was this translation helpful? Give feedback.
-
We have Entry fields, Category fields, Tag fields, etc etc... but what if we need to create a relationship between multiple of those types in one field? It would be great if we could have an Element Relationship field, which would allow developers to choose both Sections, Category Groups, etc. for content authors to establish a relationship with.
For example, a site I'm working on has a "You might be interested in" slideshow section at the bottom of their Case Studies. They would like to be able to link to other Case Studies (entries), as well as certain Categories in that slideshow—they have Case Studies categorized by "Services" and by "Industry", and the URL of each category in those is its own landing page.
Having both Entries and Categories selectable from one relationship field would really simplify things in this case. I think it also makes sense, given that Craft is moving towards an "everything is an element" approach these days.
Beta Was this translation helpful? Give feedback.
All reactions