0

I have a content page called Book, to which I also added an image field and a "term reference" to a Book taxonomy which has Book A, Book B, Book C, Book D, Book E as available terms in it.

I created 5 'Book' pages, inserted images and selected taxonomy terms (each taxonomy value are different).

I have another content page called List Book, to which I added a "term reference" to a Book taxonomy as well.

When I create a 'List book' page, I have to select a term from the Book taxonomy. If I select the terms 'Book A' and 'Book C', two images (related to Book A and Book C) will display.

Lastly I created a view with as a field the image field. As the filter, I added:

  • 'publish = yes'.
  • 'content type = Book' and 'List Book'.
  • taxonomy field from 'List Book'.

Field: image from Book

There is no result.

What is the correct way?

  • I did a major edit of your extremely hard to understand question. I mostly only corrected grammar, and grouped together (moved around) the various phrases you had in the question. I'm unsure about the 3rd paragraph now, but I think it should be MERGED also into the 1st paragraph. Please review my edit, and re-edit/correct where needed. Lastly, about your question at the end: the correct way to do "WHAT"? Please edit your question to ALSO make that clear. Note about 2nd bullet near end: I doubt that "and" in it is correct (but I didn't want to change the meaning of your question). Your turn! – Pierre.Vriens Jul 9 '15 at 8:45
  • @Pierre, Thanks for your reply. I had edited my question. – peifa Jul 10 '15 at 2:46
  • I re-visited this question, but after your latest edit I keep wondering abot this: (a) about 2nd bullet near end: I doubt that "and" in it is correct (shouldn't that be an "OR"?) and (b) about your question at the end: the correct way to do "WHAT"? – Pierre.Vriens Aug 18 '15 at 11:34
0

What I'm getting here from your question is, you want to search on the basis of category. I think, you can use exposed filter in the views to get your desired result.

You can find exposed filer in views Under "Filter Criteria".

Hope it will help you.

  • As I mention: Lastly I created a view with as a field the image field. As the filter, I added: 'publish = yes'. 'content type = Book' and 'List Book'. taxonomy field from 'List Book'. – peifa Jul 9 '15 at 8:45
  • Yes, Pierre is right. You can change 'And' with 'OR', this will show results for you. – jawad shah Jul 9 '15 at 9:20
0

About the There is no result you added (in your latest edit): that is probably because of the "and" in the 2nd bullet of your views filter ... a content type can only have 1 value, but with the "and" you can never find any hit. So remove the "and", and see if you get a "better" result (at least not empty anymore.

If that views filter in the 2nd bullet is supposed to be an "OR" instead of "AND", then refer to my answer in OR condition in Views Contextual Filters ...

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.