1

I have many image files with taxonomy associated with them. I have page nodes using the same taxonomy vocabulary. I want to create a Views block that filters the images displayed based on what that page uses for that vocabulary.

Fake example:

I have a page that is tagged with carrots and broccoli. I have image files tagged with the same terms. I want to place a Views block on the page and have that view only show images tagged with the same terms.

How do I do that?

1 Answer 1

0

Create a views block.
Under Contextual filters, add Content: Has Taxonomy Term ID
Provide Default Value -> Taxonomy Term ID from URL
Tick on 'Load default filter from node page, that's good for related taxonomy blocks' and tick your proper vocabulary.

2
  • So to clarify as I am new to Drupal. The Under Contextual filters, add Content: Has Taxonomy Term ID part of your anwser, there is no option specific to that text. Would it that be if the field on both items is called Vegetables it would say Content: Vegetables (field_vegetables). Is that the filter I should select
    – Bwata
    Commented Sep 4, 2015 at 18:40
  • Add contextual filter..From the dropdown select Content: Has Taxonomy Term ID. In the configuration settings of this filter select Provide Default Value under WHEN THE FILTER VALUE IS NOT AVAILABLE. Tick on 'Load default filter from node page, that's good for related taxonomy blocks' and tick your proper vocabulary(in your case maybe vegetables). Commented Sep 5, 2015 at 4:51

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.