Drupal Views Has Taxonomy Term with multiple terms
Asked Answered
M

2

6

Good Morning,

I am developing an website and i am in a struggle to resolve this:

I have a link like this: mywebsite.com/aliments/fruit/banana.

And in a View that creates the page aliments i want only to show terms with fruit and banana checked at the same time.

My taxonomy terms are like this way:

Fruit

-Banana

-Apple

Fish

-Sardine

And so on...

So i have the tag Fruit and banana checked at the same time.

Some how i can't do it, if someone can help me.

Thanks, Pedro Dias

Magnum answered 30/10, 2012 at 10:1 Comment(0)
D
4

From the manage view page, go to section Filter criteria and click Add.

Then choose Content: Has taxonomy term and choose the vocabulary and the both terms you wanna use.

Hope this helps... Muhammad.

Dorman answered 30/10, 2012 at 11:2 Comment(1)
First thank you for the answer @Muhammad Reda! My question was to search like in a recursive way the first argument IE is fruit and then the next would be banana, like this /fruit/banana but if i do that it will catch any banana from the terms i only want the banana that is children of the fruit, because my vocabulary has more than one repeated element.Magnum
Z
3

You can perform Validation on a Taxonomy Argument (Contextual Filter) to make sure it is part of a Vocabulary.

I would make the path of the view Ailments/Fruit/%

If you have other Vocabularies, make each one Ailments/Foo/% and Ailments/Bar/%

You can use the views Displays to share some of the features between all these views if you need to.

Zinnes answered 6/3, 2013 at 17:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.