I have a taxonomy that has duplicate term names with different parents; for example:

Mcdonalds with tid=39 has child term nuggets with tid=117 and also Other with tid=43 has child term nuggets with tid=129

I have a page view that has the path: store/%/% and i use two contextual filter to get the content but the problem is that i always get the same tid from child term, doesn't change when the parent it's different, for example the sql query using store/other/nuggets:

WHERE (( (taxonomy_term_data_field_data_field_blog_category__taxonomy_term_hierarchy.parent = '43' ) AND (taxonomy_term_data_field_data_field_blog_category.tid = '129' ) )

and returns the both tid correct, but when i go to store/mcdonalds/nuggets keeps the same tid (taxonomy_term_data_field_data_field_blog_category.tid = '129' ) instead of (taxonomy_term_data_field_data_field_blog_category.tid = '117' )

So both keeps using the same tid for child term, How can i get the tid of a taxonomy term related to taxonomy parent in contextual filter, in the case of the example tid 117 for parent tid 39 and tid 129 for parent tid 43?

I'm using Drupal 7.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.