I have two taxonomy vocabularies: departments and categories.

I created a block view to display related pages (other pages in the same department and category) using contextual filter. All works well when a node has both department and category selected. But when I leave the category empty on a node, the view still shows other pages from the same department.

Is there any way to make the view not show up on the nodes with no category?

Here is what my contextual filter looks like:

Contextual filter settings


1 Answer 1


With the help of my co-worker, we were able to make it work by adding two contextual filters: one for category and one for department taxonomy:

Category contextual filterDepartment contextual filter

All other check boxes unchecked.

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.