Hi!
I've created additional module for your project. Its features:
- Set menu active trail to current node's lightest term's menu item. This really helps with navigation on site. For example, you have term "Cars" and opened one car node (which has term "Cars") and menu keeps expanded, so visitor still can view menu tree followed him to this node (but node doesn't have menu item, only term have one).
- Node types, for which it happens, are configurable.
- Process only if node doesn't have own menu item or always, it is also configurable.
My module doesn't depend on your module (but i wrote it depends in .info file). Do you want to include it in your project or I should create my own project?
First version is in attachment.
My module does something like menutrails does, but automatically for selected nodes.
Sorry for bad English, it's not my native language.
| Comment | File | Size | Author |
|---|---|---|---|
| taxonomy_menu_trails.tar_.gz | 1.2 KB | dmitriy.trt |
Comments
Comment #1
indytechcook commentedHello Dmitriy.trt, nice work!
This feature has been requested many times :) If you can formulate this as a patch (so others can also test) I think it could make a good addition.
I actually learned a few things from your code. There are a few changes to make this integrate nicely with taxonomy menu. If you place the options in taxonomy_menu_taxonomy_menu_options() then they will automatically show up on the vocab edit page. In your own module you could use hook_taxonomy_menu_options (http://drupal.org/node/380652).
Then you would need to make a few small changes to your hook_init and _taxonomy_menu_trails_set.
How does this work when a node has multiple terms?
Make sure you use taxonomy_menu_create_path to return the path created by taxonomy menu.
Please work on this. I think it would be a great addition!
Comment #2
mattiasj commentedThis would be great, I would love to test it.
Comment #3
cels commentedoh my $deity!
I've been looking for this feature long time, great addition!
Comment #4
dmitriy.trt commentedLast version of module is in comment's attachment: http://drupal.org/node/672014#comment-2425006
Changes from last version:
indytechcook, thanks for help.
Comment #5
dmitriy.trt commentedThere is a separate project now: Taxonomy Menu Trails. Please, download and test it. This issue can be closed.
Comment #6
funkytraffic commentedPlease implement tax menu trail in tax menu; espacially version 3!
Comment #7
Conditi0n commented@ #5
Comment #8
tim.plunkettComment #9
tim.plunketthttp://drupal.org/project/taxonomy_menu_trails
Comment #11
anton-staroverov commentedI think feature described by issue author is very important. It can be implemented something like this:
Is it possible to add this feature to Taxonomy Menu?
Comment #12
johnvsee Taxonomy menu trails.