Closed (duplicate)
Project:
Taxonomy Menu
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2005 at 00:19 UTC
Updated:
26 Sep 2007 at 23:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
radbrad commentedIs it not possible to do a drupal_get_path_alias before rendering the taxonomy_menu? so that if there is an alias for a path to a node, then taxonomy menu will use that rather then taxonomy_menu/x/y
obviously a pre-requisite would be that taxonomy_menu checks is path.module is enabled, and would need some awareness of path_auto too (for indexes etc.)
Comment #2
dkruglyak commentedI think radbrad is suggesting the right approach.
I am marking this as a bug vs. feature request, since lack of this fix creates duplicate category pages and confuses navigation. One if navigated through taxonomy_menu, another when opening category directly. The latter does not show expanded menu.
Comment #3
dkruglyak commentedon a separate note, the menu should expand itself to the right depth when a corresponding category page is open, whether it is open from the menu or anywhere else
Comment #4
rcross commentedHi, i've been having the same issue, so I posted a request over at pathauto (http://drupal.org/node/37788) with a link back here so lets hopefully see some collaboration.
Thanks!
Comment #5
stmh commentedOk, here's a patch for the taxonomy_menu-module. It needs pathauto, but doesn't use pathautos generated aliases. (Because this is not possible with the current implementation of the menu-system)
Currently taxonomy_menu builds the menu-paths (which are also the links) out of taxonomy_menu/voc-id/term-id, my approach is to use the names of vocs/terms, so taxonomy_menu/voc-id/term-id gets to voc-name/term-name/subterm-name. Thanks to the nice menu-system of drupal this approach works like a charm. taxonomy_menu needs pathauto only to create 'clean' variations out of the names of vocs and terms. It doesn't use the specified aliasses. To 'transport' the ids of vocs and terms to
hook_pageI am using menu-callback-parameters.This works for me, I hope it works for you, too.
I hope I coded it the right way, (I'm still a drupal-newbie). You have a new setting under /admin/settings/taxonomy_menu to switch this new behaviour on, and it checks the existance of the pathauto_module. So the old behaviour is still there if needed/wanted and it should not break existing drupal-installations.
There is one problem with the menu-module though, after switching the aliasing on you have to reset the menu, if you get duplicate entries of the taxonomy_menu-entries.
This patch is against drupal 4.6.3 (and it's my first, so be nice with me ;)
Comment #6
moshe weitzman commenteda better approach is to use the hook provided by pathauto.module. there is an issue in this taxonomy_menu queue which implements this
Comment #7
Bevan commentedAs a temporary solution, I've modified my htaccess file. It is ideally used in conjunction with global redirect. It doesn't have any extra redirects other than what global-redirect already causes. http://drupal.org/node/121513#comment-215538
Comment #8
jiangxijay commentedSubscribe.