Hello,

I am turning to taxonomy menu to explain my needs.
This may be a feature request and I may help to implement a solution if you guide me:

I have product categories handled by taxonomy:
-> term1 (ex : LCD display)
-> term2 (ex : Power units)
Etc ...

Products are assigned one or several terms:
ProductA:term1
ProductB:term2
ProductC:term1 and term2

I would like to display the following menu:
Term1
+ProductA
+ProductC
Term2
+ProductB
+ProductC

Then I will use NiceMenus or Superfish to present to theme the menu.

The shop has less than 100 products, so it seems reasonable to display direct links to product pages:

term1 should point to the taxonomy page.
ProductA should point to the URL of the product (node).

Is this possible with Taxonomy menu?

Kind regards,
Jean-Michel

Comments

lupus78’s picture

I need the same functionality, but i think taxonomy menu is currently not capable for this!

I'm sure it can be modified to be able so, so i'll look into the code, and try to come up with a solution if it's easy.

indytechcook’s picture

lupus78. Look at the function "_taxonomy_menu_insert_link_items_process" in taxonomy_menu.batch.inc on the DRUPAL-6--2 branch.

indytechcook’s picture

also be sure to add an option in taxonomy_menu_taxonomy_menu_options. See http://drupal.org/node/380652 for more info on the options hook.

grub3’s picture

Thanks Lupus.
IMHO it would be a neat feature for Drupal Ubercart users.

grub3’s picture

Category: support » feature

Setting feature request.

I was able to fetch Ubercart catalog using:
* Menu Path Type : hierarchy
* Base Path for Hierarchy Path : =catalog

So we only need to be able to fetch tids for nodes attached to taxonomy terms.

indytechcook’s picture

taxonomy_node_get_terms gives you all of the terms on a node (http://api.drupal.org/api/function/taxonomy_node_get_terms/6)

_taxonomy_menu_get_node_terms - Get an array of the tid's related to the node (In taxonomy_module.database.inc)

The term_node table holds the relationship between the nodes and terms.

lupus78’s picture

I've started to develop this functionality, but i'm stuck.

In the taxonomy_menu.module file processes the $args variable to $items, but $items contains too much connection to the Terms! I think it would be complicated to rewrite the complete module to support Nodes! There are just too many function processing the above variables: taxonomy_menu_handler, _taxonomy_menu_create_item, taxonomy_menu_insert, _taxonomy_menu_save

Am I missing something here, is there a more simple way to do this?

iamjon’s picture

Subscribing

indytechcook’s picture

Status: Active » Postponed

You are not missing anything. This is why I haven't attempted it yet. :)

I'm setting as postponed to implement with V3.

indytechcook’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Status: Postponed » Active

Moving to V3.

squarecandy’s picture

subscribe

stefan81’s picture

is there any progress on this?

minneapolisdan’s picture

For what it's worth, I got something close to what I wanted by following this post, http://drupal.org/node/225426. I haven't figured out how to render the results as a menu yet, or have terms collapsed or open, it's just a big long list.

mattcasey’s picture

subscribing

dstol’s picture

Status: Active » Postponed

Postponing for the time being.

dstol’s picture

Status: Postponed » Closed (won't fix)

There will be no more work on the 6.x-3.x-dev branch for the foreseeable future.