Hi,
I have nodes organised in taxonomy term structures e.g.
computers
- laptops
--13''
--15''
--17''
- desktops
Now those pages that belong to the lowest level only show the top level of the taxonomy. For instance a 13'' laptop has the breadcrumb
home>laptop
instead of
home>laptop>13''
How can I solve this?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | crumbs.1559472-7.taxonomy-depth-first.7.x-1.x.patch | 1.51 KB | donquixote |
Comments
Comment #1
donquixote commentedHi,
I agree with your request.
The current logic works like this:
- starting with a node (the 13" Laptop), the taxonomy.termReference.xyz plugin will pick the first term that it can find. In your case, this is just "laptops".
- "laptops" is already at the top of the hierarchy, so the parent of that is "home".
A solution would be, if the taxonomy.termReference.xyz plugin would not pick the first term that it can find, but the one with the highest depth.
I am playing with this now..
Comment #2
donquixote commentedBtw, why is your node tagged as laptops and 13'' ? Does the 13'' category not already imply the laptops category?
Comment #3
brianlp commentedYes that's right, it does.
But I need to tag it all the way, ohterwise the node wouldn't show up on the taxonomy category pages. (Click on "laptops" should show all laptops.)
Comment #4
donquixote commentedCan you try something?
file: plugins/crumbs.taxonomy.inc,
class: _taxonomy_CrumbsMultiPlugin_termReference
replace the _findParentPath() method:
Comment #5
brianlp commentedHm, actually it takes away the base category. It sets the breadcrumb to "Home".
To be honest, I'm not a skilled programmer. I have replaced this (line 76-82)
In the crumbs settings I use
taxonomy.termReference.*
menu.*
path
Comment #6
donquixote commentedHmmm nope. You replaced the wrong thing.
Ok, I think I should make a real patch out of this.
Comment #7
donquixote commentedHere is a patch.
Comment #8
brianlp commentedYup, perfect. Now it is the ultimate breadcrumb machine.
Months of headache are gone. Thank you so much!
I have switched the priorities to first grab everything that is assigned to a menu and then the taxonomy structure for non-menu items. Otherwise the blog entries would now get the taxonomy breadcrumb.
menu.*
taxonomy.termReference.*
Comment #9
donquixote commentedThis looks very committed already :)