3

I have a question which is similar to How to use taxonomy terms(with depth) on a views exposed filter?

But problem in my case is that I am using views of type Taxonomy, here I don't get option in Filter "Taxonomy Term: Has content with depth".

I have my Taxonomy like : -Country -State 1 -City 1 -City 2 -City 3 -State 2 -City 4 -City 5 -City 6

I want exposed filter which has 3 select boxes like : -Country- -State- -City- - State and City boxes fillup by Ajax based on Country selected.

Then the view should be updated based on the selected filters. i.e If I select State 1 then I should get results of all the Cities below it and even of State 1.

Please note that I am not using View of type content, My view type is Taxonomy.

Can anyone suggest me how should I get this working?

Thanks in advance!

3

But problem in my case is that I am using views of type Taxonomy, here I don't get option in Filter "Taxonomy Term: Has content with depth".

You can bring that option into scope if you add a Relationship of "Taxonomy term: Representative node" or "Taxonomy term: Content using MY_VOCABULARY" and general any relationship that will join the node (or other Entity) table with the taxonomy table.

0

If you want to have nodes show in your Views results, you need build a view of type node. If you want taxonomy terms to show up in your results, then you build a view of type taxonomy.

If you want to use the taxonomy term with depth filter, you'll need to rebuild your view as a node view.

For example, you have a real estate site with listings -- node type is "listing" and it was a location taxonomy term associated with it that says what city each listing is in. Build a node view and add a filter of taxonomy-term-with-depth with a depth of 10 so that selecting a state will also show listings for all the cities in that state.

Hope that helps.

  • Thanks for the reply. But I have used this Taxonomy "Country" as a field in other Taxonomy say "Listing". So I can't create view of type node, I have to create view of type "Taxonomy" only. and that does not offer taxonomy-term-with-depth option. Any other way I can get the depth of taxonomy in the view of other Taxonomy? – DShah Aug 2 '13 at 11:28

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.