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
Comment #1
lupus78 commentedI 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.
Comment #2
indytechcook commentedlupus78. Look at the function "_taxonomy_menu_insert_link_items_process" in taxonomy_menu.batch.inc on the DRUPAL-6--2 branch.
Comment #3
indytechcook commentedalso 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.
Comment #4
grub3 commentedThanks Lupus.
IMHO it would be a neat feature for Drupal Ubercart users.
Comment #5
grub3 commentedSetting 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.
Comment #6
indytechcook commentedtaxonomy_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.
Comment #7
lupus78 commentedI'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?
Comment #8
iamjon commentedSubscribing
Comment #9
indytechcook commentedYou are not missing anything. This is why I haven't attempted it yet. :)
I'm setting as postponed to implement with V3.
Comment #10
indytechcook commentedMoving to V3.
Comment #11
squarecandy commentedsubscribe
Comment #12
stefan81 commentedis there any progress on this?
Comment #13
minneapolisdan commentedFor 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.
Comment #14
mattcasey commentedsubscribing
Comment #15
dstolPostponing for the time being.
Comment #16
dstolThere will be no more work on the 6.x-3.x-dev branch for the foreseeable future.