How to add a block menu of tags (or other taxonomy terms) on a Drupal site

Download and install the Taxonomy Menu module.

Download and install the Menu Block module.

Optionally create a new parent menu where all the taxonomy-based menus will reside by going to /admin/build/menu/add. I named mine Taxonomy.

Go to /admin/content/taxonomy and click the edit vocabulary link next to your tag vocabulary

Scroll down to the Taxonomy menu fieldset

Select your new menu for the Menu Location

I use the following options:

Most of the other options are there so that you can customize the paths to the taxonomy terms if you use Views, for example.

Click Save.

Go to the block administration page at /admin/build/block and click the Add menu block tab.

Start working your way down the form. Here's what I used for the Parent item settings:

I changed the custom visibility settings:

Then click the Save block button.

You'll see the menu in the disabled section of the page, and it will look something like this:

Set where you want the block to display, and then you've got your block! Here's what mine looks like:

Taxonomy menu~ Menu location: <Taxonofny> The menu and parent under which to insert taxonomy menu items. menu -Options Synchronise changes to this vocabulary Every time term is added/deleted/modified, the corresponding menu link will be altered too. Display number of items Display the number of items per taxonomy terms. Will not show up for vocabulary menu items. gj Hide empty terms Hide terms with no items attached to them. Add item for vocabulary Shows the vocabulary name as the top level menu item of the taxonomy menu. Auto expand menu items Automatically show all menu items as expanded. ■nenu UP menu or SAL LMP JL .10 or S'5 Blocks List Add block Add menu block Bl ocks Blocks Custom visibility settings: Users cannot control whether or not they see this block. BE Shorten URLs <none> configure Taxonomy :"<none> Tlconfiaure Taxonomy (levels none? configure delete Taxonomy NLM JRLs ES mint Lire fit IQ NEZ delete i--Hcon figure configure Parent item: Menu: Taxonomy Item: <rootof Taxonomy> The tree of links will only contain children of the selected parent tem. Using <the menu selected by the page> can be customized on the Menu block settings page. Item: of on lk lk. '•le Topics activism (21 apple software f6 book reviews design Drupal (27) drupal administration drupal community (13) drupal events dr modules f8 drupal resources (111 freakv stuff geeky entertainment iphone ipod touch jquery learning f6 life hacks f6 looping fl maps fl minimalism LD (4J C3) C2) -at NAT dr li.

Comments

Thanks for this post. I added a link back from the Taxonomy Menu project page (http://drupal.org/project/taxonomy_menu)

Very cool, thanks Neil!

Is there any way to put the taxonomy terms of a node you are currently viewing in a block? I know this has something to do with Context but not sure if I can tie that in with this module?

You could use a View and set an argument to pull in the nid of the node. Then, create a block display and use the block admin page or Context to display it on just the node pages.

Cheers!

Worked like a charm, many thanks!

Some note,
this method works only for Item: .
It is because, if you rebuild the taxonomy_menu, the mlid for selected menu_block item is deleted and you will see links of root of menu [vocab name].
So you have to change settings of menu_block each time you rebuild taxonomy_menu.

This method works only if you select option 'root of [vocab name]'
Sorry for mistake above.

hi, how can i have 2 vocab for example 'teachers' and 'lessons' for a content type and when user choose a teacher in 'teachers' vocab,the 'lesson' vocab box below that just show lesson that those teacher teach and other terms in that don't represent for user because it don't confuse whit many terms.i want 2 vocabularei's terms related together.
how can i do that,with taxonomy or another modules.please help to me

If the teacher is a node, you could most likely use an argument to pull in matching taxonomy terms for the lessons into a view. If both are content types, I would suggest using a node reference field instead. If both are vocabularies, you will need to explore views relationships to connect up the term with the node, and then the node with the terms in the other vocabulary.

I hope that helps!

Cheers,
Chris

Thanks! I've been trying to find an easy way to do this. How do you create a menu block like the one you created for archives? Thanks!

Hey Seth, I wrote a blog post to answer your question here: http://chrisshattuck.com/blog/how-create-monthly-archive-block-drupal-bl.... In summary, you can just enable the archive view that comes bundled with Views, and then set the block to display. However, I also outline the more complicated method of creating the view yourself.

Cheers!

Just a note. Nothing of this will work if you have the "taxonomy_term" view enabled in Views. It took me a while to figure it out!

I'm new to Drupal, where is the "views" page?

Hi Hana, you can find it at /admin/build/views. Cheers!

I must be doing something wrong, because it's not working for me. It seems that the menu is made correctly because once I expand my admin tree I can see my vocabulary under the Taxonomy parent menu. I can also see another set underneath that with the same vocabulary. Looks like what I've pasted below. BUT when I try to activate the menu onto my right sidebar (or left, or header, or anything) it just doesn't show up...

Administer

* Content management
* Site building
o Blocks
o Menus
+ Navigation
+ Primary links
+ Secondary links
+ Taxonomy parent
# Years
* 1997 (0)
* 1998 (0)
* 1999 (0)
* 2000 (0)
* 2001 (0)
* 2002 (0)
* 2003 (0)
* 2004 (0)
* 2005 (0)
* 2006 (0)
* 2007 (0)
* 2008 (0)
* 2009 (0)
* 2010 (1)
+ Years
# Years

Thanx for this guide. Is it possible to link the parent-item with a custom link?

current parent-link looks like this: http://www.testside.com/taxonomy/term/1 16 8 9 13 3 10 11 15 7 17 12 14
what i want: http://www.testside.com/ (Homepage)

Thanks so much for the guide. I'm still a noob at this and I'm looking for advice for the best method so that if the user clicks on, for example, the menu block link for the taxonomy term "Fruit" and there's just 1 entry that it skips straight to that entry's node and bypasses the list.

What are the benefits/disadvantages of this taxonomy menu set up you have outlined compared to using views blocks for menus that have the "link direct to taxonomy term page" checked?

Great tutorial - thanks for sharing.

Post new comment

The content of this field is kept private and will not be shown publicly.