4

So I have a taxonomy hierarchy (assigned to blog posts as free tags) that looks, say, something like this (apologies, it's totally arbitrary for testing purposes right now):

Example taxonomy terms

I'd like to create a block that simply outputs what I see in this menu: The taxonomy terms, ordered into a heirarchy, with links to the taxonomy term page (listing all content that this term is attached to). Ideally also, a count for the number of nodes each term is attached to.

At first I tried defining a block and used taxonomy_get_tree but that was a bit of a deal trying to recursively turn the output of that function into something I could work with. I also tried views, bringing in taxonomy terms but I couldn't get them to display as a hierarchy, or get the count to show.

So I'm a bit stumped. Any thoughts?

persepolis
  • 789
  • 3
  • 12
  • 22

1 Answers1

5

Have you checked out the taxonomy menu module - http://drupal.org/project/taxonomy_menu This module does everything you mentioned as well as outputting the number.

jsheffers
  • 1,602
  • 19
  • 41
  • 1
    Perfect - I actually spent some time looking for D7 modules of this ilk but somehow overlooked this. Thankyou. – persepolis Mar 14 '12 at 10:04