Hierarchical Taxonomy - getting it to show subitems

Gidgidonihah - March 16, 2009 - 21:01

I have pretty simple content on my site. Most of which are catalog items. I have a hierarchical taxonomy that looks something like this:

Catalog
- Home
   - Bookmarks
      - bm 1
      - bm 2
      - bm 3
   - Cases
      - thing 1
      - thing 2
      - thing 3
<snip>
- Office
<snip>

When I have items tagged with bookmarks, they show up on the page for bookmarks. Great, but they don't show up on the level above that.
So despite the fact that I have bookmarks and cases, if I click on home, there's nothing there.

Basically this same taxonomy is the structure for the menu system as well. I figured taxonomy would be the easiest way to do this. If I click on catalog, I want it to show all catalog items. Home, show only the items under home and so on.

I just don't know how to get it to behave like this.

Suggestions?

Despite all the trumpets and

-Anti- - March 16, 2009 - 23:03

Despite all the trumpets and fanfares about taxonomy system,
I don't think Drupal supports proper hierarchical taxonomy.

I think the only way to currently do what you want is use the /all parameter in the url.

Eg. if 'bookmarks' has a term id of 3, then taxonomy/term/3/all
will display a teaser list of nodes tagged with 'bookmarks', 'bm1', 'bm2', or 'bm3'.

This list can be aliased to something nicer like: domain.com/bookmarks

And perhaps you can do something with the /all parameter in a Views2 'argument',
although I don't understand Views arguments, so I don't know whether that is useful or possible.

Ok, thanks for that. It's

Gidgidonihah - March 17, 2009 - 19:10

Ok, thanks for that. It's what I was looking for. I'll give that a try and report back. Thanks!

Looks like that's working

Gidgidonihah - March 18, 2009 - 06:38

Looks like that's working well. Just one more question.

What would be the link to show all items that belong the vocabulary?

But I don't know the url to list all the items in a vocab. Taxonomy menu just has a link like taxonomy/term/1 2 3 4 ... 67

I'm basically doing what taxonomy menu does, but the urls that it creates just won't work for me. I'd much rather have /taxonomy/term/1/all than taxonomy/term/1 2 3 4 5 6

> What would be the link to

-Anti- - March 18, 2009 - 08:10

> What would be the link to show all items that belong the vocabulary?

I know... I nearly fell out of my chair when I found out that you couldn't do that for vocabs.
You'll definitely need a module for that. Check out the ones Worldfallz mentioned.
Although, I've never had much luck with taxonomy modules actually doing what I expected/needed.

_

WorldFallz - March 18, 2009 - 14:20

Another option that's very useful is the http://drupal.org/project/taxonomy_list module-- and it includes the 'taxonomy/vocabulary/vid' feature.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

_

WorldFallz - March 17, 2009 - 19:44

I fixed this problem with the hierarchical_select module-- it has an option to force saving the entire hierarchy. There are also several contributed modules that handle displaying a hierarchical taxonomy in different ways (i.e. taxonomyblocks, taxonomy_context, submenutree).

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Hi, Taxonomy_menu D6 version

Summit - March 18, 2009 - 08:13

Hi,
Taxonomy_menu D6 version 2 has hierarchical menu as an option.

Greetings,
Martijn
www.trekking-world.com

Greetings,
Martijn
if you appreciate e-development work, please place a link from your site to www.trekking-world.com

 
 

Drupal is a registered trademark of Dries Buytaert.