Menu doesn't play well with taxonomy/term/%/all pages
twiinz - April 27, 2008 - 16:44
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | taxonomy.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs work) |
Description
Example of menu:
book ('link_path' => taxonomy/term/1/all)
-- art
-- politics
Problem: After clicking on the book link, the menu won't expand to show its children like it normally should.
Reason: A call to get_menu_item() on the page 'taxonomy/term/1/all' will return an item with a href field of 'taxonomy/term/1'. This href won't match the link_path for the book item in the menu, which in turn won't be marked as a member of the active trail, which leads to it's children not showing.
Fix: By having taxonomy/term/%/all in the menu router get_menu_item() will return the correct href
The problem also exits in D6, D5 has the intended behavior.
| Attachment | Size |
|---|---|
| taxonomy.module.patch | 1.06 KB |

#1
My bad.
#2
Seems reasonable to have an explicit callback for this path, however there's now loader functions for %taxonomy_terms, so could use a re-roll for that.