0

By default Drupal 8 taxonomy view doesn't show the nodes of child taxonomy terms. I need to include them but don't know to to modify the view Taxonomy term (Content).

I have the following vocabulary:

- Europe
  - Portugal
    - Lisbon
    - Porto
  - Spain
    - Barcelona
    - Madrid

Showing all the content related to cities works fine (for example Barcelona). But now I want to show a list of content for countries (for example Spain) which should include content tagged as city (Barcelona and Madrid). And the same with continents, a list for Europe should include content tagged as Lisbon, Porto, Barcelona, Madrid, etc.

0

Finally found the answer and it is almost the same than for D7:

  1. Edit the existing view Taxonomy Term (admin/structure/views/view/taxonomy_term/edit)
  2. In Advanced, add the field Content: Has taxonomy term ID (with depth) using all the settings from already added Content: Has taxonomy term ID using the same settings. You can limit the depth by setting the depth parameter.
  3. Remove old field Content: Has taxonomy term ID using the same settings
  4. Set Use aggregation to yes to avoid duplicates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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