I am making a view that gives the title of an article. It has a term reference field. Taxonomy tree is somewhat like:
- A
- a
- b
- c
- B
- 1
- 2
- 3
So I want to make a view that work in such a way that when one is on the taxonomy term page "a", he could see all the relevant title of taxonomy term 'a','b' and 'c'.
This is the query that the view has generated.
SELECT node.title AS node_title, node.nid AS nid, node.language AS node_language, node.created AS node_created, node_counter.totalcount AS node_counter_totalcount
FROM
{node} node
LEFT JOIN {field_data_field_categories} field_data_field_categories ON node.nid = field_data_field_categories.entity_id AND (field_data_field_categories.entity_type = 'node' AND field_data_field_categories.deleted = '0')
INNER JOIN {taxonomy_term_data} taxonomy_term_data_field_data_field_categories ON field_data_field_categories.field_categories_tid = taxonomy_term_data_field_data_field_categories.tid
LEFT JOIN {taxonomy_term_hierarchy} taxonomy_term_data_field_data_field_categories__taxonomy_term_hierarchy ON taxonomy_term_data_field_data_field_categories.tid = taxonomy_term_data_field_data_field_categories__taxonomy_term_hierarchy.tid
LEFT JOIN {node_counter} node_counter ON node.nid = node_counter.nid
WHERE (( (taxonomy_term_data_field_data_field_categories__taxonomy_term_hierarchy.parent = '46' ) )AND(( (node.status = '1') AND (node.type IN ('article')) AND (node.language IN ('en')) )))
ORDER BY node_created DESC, node_counter_totalcount DESC
LIMIT 7 OFFSET 0
But is still not working.