Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make sub terms show in main taxonomy page in Drupal?

I have categories:

  • Cameras (4)
    • Accessories (2)
    • Bags and Casings (2)
      • Inner (1)
      • Outer (1)

If I open cameras, I see nothing, only:

There is currently no content classified with this term.

Instead, I want the view to automatically show the children if I click on "Cameras". Clicking on cameras should therefore show all the contents of Accessories and also bags and casings and inner and outer. If I click on Bags and Casings, it must only show bags and casings, inner and outer.

How would I do this?

like image 531
coderama Avatar asked Apr 13 '15 15:04

coderama


People also ask

What are taxonomy terms in Drupal?

Taxonomy, a powerful core module, allows you to connect, relate and classify your website's content. In Drupal, these terms are gathered within "vocabularies". The Taxonomy module allows you to create, manage and apply those vocabularies. Drupal 7 and 8 has the ability to add taxonomy fields to vocabularies and terms.

What do you mean by controlled vocabulary in Drupal?

Sub-term = Fusion. Sometimes you will want to create a "controlled vocabulary," where content authors can assign terms that have been predetermined. If so, you will need to add those terms to your vocabulary in advance.


1 Answers

Have you tried adding the contextual filter Content: Has taxonomy term ID (with depth) of to the view? See https://drupal.stackexchange.com/a/58526

like image 90
nmc Avatar answered Oct 21 '22 09:10

nmc