Axel Achten
Axel Achten

Reputation: 25

Drupal Views : table view of documents using taxonomy hierarchy

I need help with a View in Drupal 10:

I've got a bunch Medias (documents) on my website. These documents are sorted using a multi-level Taxonomy like this:

- Term 1
  - Sub Term 1
  - Sub Term 2
- Term 2
- Term 3

This Taxonomy allows editors to sort the documents into categories. I need to have a View using a table format, listing all documents grouped by Taxonomy term and taking sub terms into account, like this:

(Group Term 1)
  (Group Sub Term 1)
    - Document 1
    - Document 2
  (Group Sub Term 2)
    - Document 3
    - Document 4

(Group Term 2)
  - Document 5
  - Document 6

(Group Term 3)
  - Document 7
  - Document 8

But I always end up having the Documents 1, 2, 3 and 4 in this example listed twice, like this:

(Group Term 1)
  (Group Sub Term 1)
    - Document 1
    - Document 2
  (Group Sub Term 2)
    - Document 3
    - Document 4

(Group Term 1)  /* <-- this group should be excluded */
  - Document 1
  - Document 2
  - Document 3
  - Document 4

(Group Term 2)
  - Document 5
  - Document 6

(Group Term 3)
  - Document 7
  - Document 8

Is there a way to achieve this correctly?

Upvotes: 0

Views: 35

Answers (0)

Related Questions