0

I'm working on customizing a view that is displaying a content type. I need to build an attachment that shows available taxonomy terms on this content type.

In this attachment, I currently have the taxonomy term name displaying as a field for each returned instance of the content type.

Grouping the results by the taxonomy name field produces one instance of each term as an <h3> followed by one instance for each node that was returned:

TAXONOMY TERM 1 (Grouping Title, H3)
    taxonomy term 1 (term on node)
    taxonomy term 1 (term on node)
    taxonomy term 1 (term on node)
TAXONOMY TERM 2 (Grouping Title, H3)
    taxonomy term 2 (term on node)
    taxonomy term 2 (term on node)
    taxonomy term 2 (term on node)

Is there a way to just show the grouping without outputting the additional content? Something like:

TAXONOMY TERM 1 (Grouping Title, H3)
TAXONOMY TERM 2 (Grouping Title, H3)

This would produce exactly what I need but I can't figure out a good way to do this.

I've tried aggregation but this makes exposed filter inheritance for the attachment messy and unreliable.

Thank you!

1 Answer 1

1

Since you want to display all the terms possible, and not only those assigned to nodes, it doesn't make sense to build it through a Node View.

You can create a new View of type Taxonomy terms, create a block displaying Taxonomy terms, then place the Block in the Content region on your Views page (or any other region).

Alternatively you could also use a module to create the block listing Taxonomy terms: Taxonomy menu and again place the Block in a region and restrict it to show only on your node View page.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.