1

Hi everybody,

I've been freshly introduced to Drupal and I'm having my first "serious" issue with contextual filters and relationships. Here is the context :

  • I have a "process" content type and several contents (processes)based on it

  • Some processes (contents) have an field, called "sub-process", which is an entity reference to processes

  • I made a grid page view showing every process and a bloxk view showing every "sub-process"

  • In every cell of the grid, there is one process and I want to display the sub-processes attached to it.

  • I can display the name of every process's sub-process through the "sub-process" field, but I would like to display other properties of these subprocesses.

  • To do so, I used the Views Field View module and a Global : view field. The problem is that it shoes all the subprocesses in all the cells of the gris except the right ones.

Any idea how to proceed ?

2 Answers 2

2

On your "subprocess" display, you need to add a relationship to the process that is referencing that subprocess. Then add a contextual filter of the process id using the relationship you created. Finally, add a field "Id" in the "process" display and pass the process id as contextual filter in the global view field (check the replacing patterns).

0

Sounds like you should consider https://www.drupal.org/project/views_field_view . It is basically a subquery. make sure you have views caching enabled as these can get complex quickly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.