Is there a drupal function or a code snippet that will let me take the array returned by taxonomy_get_tree and display it as a nested menu? I've looked at some of the modules, but they do a lot of other stuff I don't need. Essentially, I need to use taxonomy_get_tree($vid,$tid) to get all the descendent terms in a branch of a vocabulary, and then I need to format them as a menu with each link passing arguments to a view. This will allow me to look at www.example.com/squash and get a page of all the different squashes, and have a block that provides a nested menu starting at squash with all the squashes listed under it. When I click on pumpkins in the menu block, I pass pumpkins as an argument to the squash view and produce a url that reads www.example.com/squash/pumpkins. I'm probably missing something really simple.
Thanks,
Doug
Comments
Here's a little something
Here's a little something from me to you.
:)
Here is some code I built from code used to generate a list of child terms, but it had not parent child or indentations. Hope you can build from this.
You will need to change the $vid variable to the vocabulary ID of the menu you want to create.
Put this in a page or block and set the input format to PHP:
Hope this helps you.
My code
May be someone could improve my code: http://drupal.org/node/965328#comment-3682088 ?