0

On an taxonomy term page, I need to display Content Items tagged with that term, but also Content Items that are tagged with the term nested through another term. And I want to show the items displayed also on the parent taxonomy term pages. I managed this before by using two different contextual filters "Has taxonomy term ID (with depth)" and changing the condition to OR by using the module "Views Contextual Filters OR".

content-type-1 > term-1 OR content-type-2 > term-X > term-1

When I test each Contextual Filter by its own, everything works fine: The first one shows the content directly tagged with the term, the other one shows the content tagged nested. When I use both contextual filters, it shows no result.

Here the relationship

 relationships: field_structure: id: field_structure table: node__field_structure field: field_structure relationship: none group_type: group admin_label: 'field_structure: Taxonomy term (ARCHITECTURE)' plugin_id: standard required: false field_location: id: field_location table: taxonomy_term__field_location field: field_location relationship: field_structure group_type: group admin_label: 'field_location: Taxonomy term' plugin_id: standard required: false reverse__node__field_location: id: reverse__node__field_location table: taxonomy_term_field_data field: reverse__node__field_location relationship: field_location group_type: group admin_label: 'field_location CONTENT USING (ARCHITECTURE)' entity_type: taxonomy_term plugin_id: entity_reverse required: false field_location_1: id: field_location_1 table: node__field_location field: field_location relationship: none group_type: group admin_label: 'field_location: Taxonomy term (OTHER)' plugin_id: standard required: false reverse__node__field_location_1: id: reverse__node__field_location_1 table: taxonomy_term_field_data field: reverse__node__field_location relationship: field_location_1 group_type: group admin_label: 'field_location (OTHER)' entity_type: taxonomy_term plugin_id: entity_reverse required: false 

And this are the two contextual filters:

 arguments: term_node_tid_depth: id: term_node_tid_depth table: node_field_data field: term_node_tid_depth relationship: reverse__node__field_location group_type: group admin_label: '' entity_type: node plugin_id: taxonomy_index_tid_depth default_action: default exception: value: all title_enable: false title: All title_enable: false title: '' default_argument_type: taxonomy_tid default_argument_options: term_page: '1' node: false limit: false vids: { } anyall: ',' summary_options: base_path: '' count: true override: false items_per_page: 25 summary: sort_order: asc number_of_records: 0 format: default_summary specify_validation: true validate: type: 'entity:taxonomy_term' fail: 'not found' validate_options: bundles: location: location access: false operation: view multiple: 0 break_phrase: false depth: 10 use_taxonomy_term_path: false term_node_tid_depth_1: id: term_node_tid_depth_1 table: node_field_data field: term_node_tid_depth relationship: none group_type: group admin_label: '' entity_type: node plugin_id: taxonomy_index_tid_depth default_action: default exception: value: all title_enable: false title: All title_enable: true title: "{% set tid = raw_arguments.term_node_tid_depth %} {{ drupal_field('name', 'taxonomy_term', tid) }}" default_argument_type: taxonomy_tid default_argument_options: term_page: '1' node: false limit: false vids: { } anyall: ',' summary_options: base_path: '' count: true override: false items_per_page: 25 summary: sort_order: asc number_of_records: 0 format: default_summary specify_validation: true validate: type: 'entity:taxonomy_term' fail: 'not found' validate_options: bundles: location: location access: false operation: view multiple: 0 break_phrase: false depth: 10 use_taxonomy_term_path: false 

I am searching for weeks, but I could not find out, where I am wrong.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.