Views relations

Rating

When you want to combine 2 or more content types or other entities, you need views relations.

Content type 1: Painters.


Drupal8_001492.png

Content type 2: Paintings. Mind the reference below tot the painter (=schilder)


Drupal8_001493.png

The reference field...


Drupal8_001494.png

If you make a view you can add all teh fields of the content type paintings. You can even show the painter. But you can not go any further. To show the image of the painter is not possible without a relation.

 

Drupal8_001501.png

You can choose between 2 options. Take the first.

Drupal8_001495.png

Now you can use the relation to add the fields.


Drupal8_001496.png

The result...


Drupal8_001497.png

What if we make a view starting with the content type of the painters. Can we add the paintings corresponding to them? Yes, but we need the second option now.

Drupal8_001498.png

Now we can add the fields from the content type Paintings. Mind that ik use the field title with a relationship. Logic isn'it.


Drupal8_001499.png

The result:


Drupal8_001500.png