Closed (fixed)
Project:
Taxonomy Menu Trails
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2011 at 06:15 UTC
Updated:
8 Apr 2012 at 18:30 UTC
The attached patch adds a hook to _taxonomy_menu_trails_get_path(). This allows other modules to provide any kind of mapping for terms of a given id.
Example use cases:
- You have a view of all nodes of a given term id And want to keep the menu trail to that view.
- You have a node with an explicit list of other nodes, which all have the same trail.
- Whatever :)
| Comment | File | Size | Author |
|---|---|---|---|
| taxonomy_get_path_hook.patch | 1.63 KB | berdir |
Comments
Comment #1
dmitriy.trt commentedThanks for patch. Looks good! Except for
$vidsvariable, which depends on "tm_integration" option enabled. Probably, we should:Comment #2
summit commentedThis would be awesome to have it also working on views!
Greetings, Martijn
Comment #3
dmitriy.trt commented2 Summit:
Do you mean node detection on non-default paths (for example, view with nid argument)? It is already released, see #1129760: Custom paths to nodes.
If not, please explain.
Comment #4
berdirClarification of my patch/this issue:
My patch is actually the reverse of the linked issue, if I understood it correctly.
The other issue is about supporting different "source" paths.
My patch is about supporting other things than the default node -> term mapping. In our case where I needed this, it was related to terms, but not the default taxonomy_term page (or a view override of that), but custom node pages which had a list of other nodes (which happened to share the same term, but the page has been manually created).
Basically, it is possible to define *any* mapping you can think of (e.g. a view, another node that references this one with a node reference field, the author of the node, ...). This kinda breaks the Taxonomy part in "Taxonomy Menu Trails", though :)
Comment #5
dmitriy.trt commentedA bit different hook is now defined in TMT. See taxonomy_menu_trails.api.php.
Dev version will be packaged in the next 12 hours.