If I enable the option "Hide menu items that don't match any nodes." (in "Taxonomy filter" -> "Menues" -> "edit menu") the menu shows only that terms, that were assigned to - at least - one node in the whole Drupal installation. But I want Taxonomy Filter to show only that terms, that will lead to - at least - one hit.

Example:

Node44 is tagged with "foo", "bar" and "funny". Node55 is tagged with "not-funny".

If I select the terms "foo", "bar" and "funny", I get one node as a match: Node44. But the menu still shows the item: "not-funny". If I choose "not-funny", too, I get (of course) 0 results.

Comments

styro’s picture

Category: feature » bug

This sounds more like a bug report than a feature request. What you want is how it is supposed to work, and it actually does work like that (with one exception - see below).

What taxonomy_filter submodules do you have enabled, and what settings have you set. There is a combination of submodules documented in the known issues at the bottom of the README.txt file that don't work well together (yet). ie the count submodule and the multi term submodule together cause issues.

no2e’s picture

I had enabled all submodules. Now I deactivated some for testing.

Still active:

  • Multi Term
  • Dynamic Tree Menu

The menu still shows me terms, that are not used in any of the matching nodes.
Even terms of a vocabulary, which allows only one term of it per node. For example: a vocabulary "Sex" with terms "female" and "male". Each node can only be tagged with one of that terms. If I select "female" in the Taxonomy filter (dynamic) menu, I'm still allowed to choose "male" (which would lead to 0 results).

Well, I think it's because I can't activate "Hide menu items that don't match any nodes." anymore. Is "Count Results" needed for this feature? If yes, I got a problem... ;-) I need Multi Term (2 terms are not enough) and would like Taxonomy Filter only to show terms, that are used in the results. I don't need the counts/numbers behind the menu items, though. Any chance?

styro’s picture

Yeah, the count submodule is needed to count the result sets (even checking for 0 requires counting the results).

Unfortunately, it was looking quite involved to get count and multi working nicer together while still keeping them independent from each other. The problem is that multi alters the link to mean something else and adds another link, and count doesn't know about the context of what multi does.

Have you looked at http://drupal.org/project/faceted_search as an alternative?

I'm starting to wonder if faceted_search makes taxonomy_filter redundant now :)

no2e’s picture

Have you looked at http://drupal.org/project/faceted_search as an alternative?

I'm starting to wonder if faceted_search makes taxonomy_filter redundant now :)

I did not test faceted_search yet (Drupal 6 version is kind of new), but I will in the next days.
Another module similar to yours and faceted_search is Refine by taxonomy. I used it with Drupal 5 and it worked, but it had very long loading time. Now I was very happy when I found Taxonomy Filter, because it seemed to work even better.

In my opinion, one of such modules should be in the core of Drupal.
That powerful vocabulary system comes to its full potential only if users are able to combine the terms. And therefor we need menus which are offered by Taxonomy Filter, Refine by Taxo or now Faceted Search.

no2e’s picture

Now I gave Faceted Search a look.
As mentioned in this issue, Faceted Search is not capable of combining several terms of one vocabulary. So it's no compensation to your module.

I'd really love to see Taxonomy Filter work that way.
I'm no programmer, unfortunately :(

solotandem’s picture

Assigned: Unassigned » solotandem
Status: Active » Needs review

This functionality should be in the latest dev release (see #447896: Change base menu template to display a refine search block and show the current search criteria). Use the base or cloud menu template and enable the tf_multi module. Also enable the tf_count module if you want the display with counts like:

Location:
+usa (12)
+uk (8)
+france (3)

I also added a 'current search results' area above the node listings where the page title is. This may need some refinement.

Try it and let me know.

solotandem’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.