I work on a view block which displays a list of parts (content Type : parts), here are simplified examples of parts and fields :
- part_ref || part_id
- ABCD || 10
- BCDE || 11
- CDEF || 11
- DEFG || 11
- EFGH || 12
In my View Filters, only one part is displayed, filtered by "part_ref". What I would like to do is to display other parts with the same "part_id".
For example, "BCDE" is displayed, I would like to display also "CDEF" and "DEFG".
I have created a Twig Extension in order to do something like : {{ displayRelated(11) }}
But inside my function "displayRelated", Idon't know how to get parts with the passed "part_id".
Does someone have a link or something to guide me ? I cannot find anything on google.
Or maybe it's not the right approach ?
Thanks in advance.