I have a Content Type called "All Documents", this uses a Category called "All Categories". Within "All Categories" I have multiple sub-categories eg "Sales", "Parts" and "Service".

I have a block that displays the related content of "All Documents" but this shows everything in that Category. How do I filter so if I am viewing "Parts" it will only show content related to that sub-category?

1 Answer 1


At first, category and sub-category should be in Drupal-terms. Taxonomy vocabulary, taxonomy terms etc.

Assuming your related content block is created with contextual filters.

You can add these contextual filters to your views:

  • Content: Has taxonomy term ID (with depth)

Display content if it has the selected taxonomy terms, or children of the selected terms. Due to additional complexity, this has fewer options than the versions without depth.

  • Content: Has taxonomy term ID depth modifier

Allows the "depth" for Taxonomy: Term ID (with depth) to be modified via an additional contextual filter value.

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.