I'd like to be able to insert taxonomy menu into my main menu system - by default this works great (with primary and secondary links both set to primary, so that I can have a 'tabbed' navigation), especially with menu trails so that I can keep extended menu effects.

The only problem is that the "root" top level link is a locked path to the taxonomy page of that category - showing its children and subcategories etc. This makes sense, but I have special panel pages that act as the "root" of my taxonomies, and I need to replace the root level path of each while still maintaining the automatically created taxonomy menu. I've already specified that the top level breadcrumb points to the portal page, and that works perfectly when navigating the breadcrumb links, I just can't change the menu path for the top level item.

Is there any way to achieve this? I'm open to any workaround - hacking the module, URL trickery, anything that will do this. I tried a simple trick of creating a new menu item, placing the taxonomy menu under that item, then disabling the top level taxonomy link - which works great in a block, but doesn't show the 'secondary' links in the main menu.

Help :(

Comments

indytechcook’s picture

This will be a feature for the 6.x-2.x version. If someone is willing to submit a patch I will apply to the 5.x

indytechcook’s picture

Work around would be to look in the hook for hook_menu where it's adding the cycling through the vocab, and change it there.

sansui’s picture

That's awesome to hear it will be a feature in the 6.x version!

Unfortunately I'm stuck in 5.x on this particular implementation for now :(

I opened up the taxonomy menu module and inc file and located the functions for hook_menu - unfortunately I have rudimentary php skills. Would it be something as simple as an if statement or a case for say... "category/4" in the right location? Thank you so much for pointing me in the right direction though, and hoping you can give me a quickie example in the module file, still pretty excited to hear it will be in 6.x :)

indytechcook’s picture

Try commenting out this code on line 153 of taxonomy_menu.inc. This should make it so it never show the vocab item for any vocabulary. A more better fix would be to add an option to the admin form, set a variable and check that variables value to see if this code should be run. It wouldn't be that complicated. It would be a good first patch if this is something you want to try.

 $items[$path] = array(
  'access'          => $access,
  'callback'        => '__taxonomy_menu_page',
  'file'            => 'taxonomy_menu.inc',
  'page callback'   => '__taxonomy_menu_page',
  'path'            => $path,
  'title'           => t($vocabulary->name),
  'weight'          => $vocabulary->weight
 );
sansui’s picture

Commenting it out just seems to make the menu not available at all in the menu system 0.o

I tried a set of statements to change the path to something like "project" if the path was "4" and so on, but this seems to result in the active menu trails disappearing + on content pages I get an overloaded object error. Doh.

yingtho’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new1.16 KB
new2.62 KB

I had the same issue and it had me bugged. Now i have figured a solution. Please see enclosed diff file.
Here you have an option in the taxonomy configuration to moved it to the root menu. The default is false.
It works fine for me. Please test and set status to "reviewd and tested by community" when you have tested it without error.

yingtho’s picture

Status: Reviewed & tested by the community » Needs review
stoltoguzzi’s picture

ist this now an option in version 6.x can't find it?
see #1

arlinsandbulte’s picture

Status: Needs review » Postponed (maintainer needs more info)

Any support for this patch?
Any news?

If there are no updates after a couple of months at "postponed (maintainer needs more info)," I will mark this issue as "won't fix."
If you want to keep this issue alive, please review the patch above and mark as RTBC or "needs work."

jlevis’s picture

This is similar to #424160: Module for adding a custom path for the vocabulary only inserts garbage chars (%252F) before the vocab name.

I could use the same functionality as in the issue description at the top, but I can't figure out how to do it in the module as it is currently.

arlinsandbulte’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Old issue (5.x too).
Closing