I'm in the middle of a Drupal 6 to 8 migration and am attempting to recreate a view. This view would appear on pages of the content type "People" and would show the "Publications" that this person is associated with. The "Publications" has a field of type "Entity reference" that references each of the "People" titles.

How do I configure the view block to only show Publications that have the entity reference of the current "People" page? I figure this has something to deal with contextual filters, but I'm a bit lost on how to filter this correctly.

Thank you in advance.

1 Answer 1


Recreating Drupal 6 Views in Drupal 8 should be quite straightforward. What got you confused?

You need to create a list of all "Child" nodes (Publications) and add the Contextual filter for the Entity reference field that references the "parent". Configure that filter to use the "Provide default value", "Content ID from URL". Adjust all the other options in the filter to your specific needs.

When you add the Block to a region in your theme you also have to set the option again (in the Block settings) for the Contextual filter to use the Content ID from URL.

  • Thank you for your answer, this was what I needed.
    – Lucas
    Commented Aug 1, 2019 at 23:28

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.