Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I'm trying to define a View listing content nodes which are tagged with a hierarchical taxonomy. The nodes are collected using contextual filter "Content: Has taxonomy term ID (with depth)" and this I got working. However I still need to group the nodes using a criterion/field that's not easily available. I'd call it "Second-level term", that is to say that in the following example:

Top Term 1
  Term 1.1
  Term 1.2
    Term 1.2.1
      Term 1.2.1.1
Top Term 2
  Term 2.1
    Term 2.1.1
  Term 2.2

I need to group nodes using Term 1.1, Term 1.2, Term 2.1 and so on, regardless of how deep the term on a node is. For node tagged with Term 1.2.1.1 I still would need it to appear in the group of Term 1.2

One way that came to my mind was to establish two child-parent-grandparent relationship, but when I do so, the grandparent relationship cannot be used for Grouping field.

What would be the easiest way to do that then?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.