Entity view (Content)

Creating a Menu from Taxonomy

By dliau
Jan. 10, 2011

Ever needed to use taxonomy as a menu? There's a very easy to use module that does exactly that. Taxonomy Menuturns any vocabulary into a menu that can be manipulated like other menus on the site. Taxonomy Menu will alter the form for vocabulary settings and provides options to build the menu. You can either use an existing menu or create your own menu from the Menu settings. Other options allow you to customize the way each vocabulary will behave such as:

  • - synchronizing changes to the vocabulary
  • - displaying number of items
  • - including the vocabulary as an item
  • - expanding the menu by default

By default, all you need to do is select the menu and click save. On the first save, it will automatically build the menu. Afterward, to rebuild, check off the box to rebuild above the save button. Once the menu has been built and the synchronizing option is on, any changes to the vocabulary will change the menu. But menu items can still be disabled through the menu options since it is just a regular menu. If you wanted to print out the menu by itself, you can use the function menu_tree() and pass in the menu name. print menu_tree('menu-whats-on-sale'); I found this module very useful, hope others will too. This module is currently supported for D6/7.

Post Tags: