Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dstol’s picture

Nope, you're not missing anything. It's being worked on, although patches are always welcome!

wheatpenny’s picture

Status: Active » Postponed

Thank you for your note. I hope that once I "get" Drupal that I'll be able to contribute. As is, this module is still solving 2/3rds of my navigation. Thanks!

essbee’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Component: Documentation » Code
Category: support » feature

Subscribe

simon_s’s picture

subscribe

WilliamV’s picture

Are there any updates on this issue?

andypost’s picture

Nick Robillard’s picture

Subscribing.

xandeadx’s picture

Subscribing.

Aracon’s picture

Status: Postponed » Needs review
FileSize
4.53 KB

I ported 6.x-2.9 path_custom do 7.x-1.1. There was only one change in path_custom, in taxonomy_menu_path_custom.module, lines 65-69. It seems to be working.
The module also needs to apply the fixes to taxonomy_menu.database.inc from my another issue: http://drupal.org/node/1175470

ryanoreilly’s picture

@ #9 When I change the menu path type from "Default" to "Custom path" all my menu items disappear, but reappear when I change the path back to "Default."

Aracon’s picture

I'm sorry, I have no time at now to fixing this module, the aim was just to make it working in my project. Try to create a new menu with "Custom path" or to check the box "Update menus on save" before saving changes.

westbywest’s picture

I believe I was able to get taxonomy_menu_path_custom.zip working, i.e. menu items populated. But I had to set the variable for the custom path via drush; no options appeared for setting this field in the taxonomy vocab edit form.

E.g.
drush -u admin vset taxonomy_menu_taxonomy_menu_path_custom_base_path_2 custom_path

garethhallnz’s picture

I have spent hours looking into this problem and perhaps I am just missing something? The problem is registering a new path with arg(1) won't work?
So in the callback function for hook_taxonomy_menu_path()

$path = url('session-location/' . $tid); // WILL NOT WORK

$path = url('session-location/view/' . $tid); WORKS

This code works for me

<?php
/**
 * @file
 * This modules extends the sessions functionality
 */

/**
* Implementation of hook_taxonomy_menu_path.
*
* @return array
*  function name => Display Title
*  a list of the path options.
*/
function session_taxonomy_menu_path() {
  $output = array('session_location_path' => t('Session Locations'));

  return $output;
}

/**
* Callback for hook_taxonomy_menu_path
*/
function session_location_path($vid, $tid) {
  if ($tid == 0) {
    //get all of the terms for the vocab
    $vtids = _taxonomy_menu_get_terms($vid);
    $end = implode(' ', $vtids);
    $path = "taxonomy/term/$end";
  }
  else {
    $path = url('session-location/view/' . $tid);
    // Url adds a '/' to the beginning so remove it now.
    $path = substr($path, 1);
    if (variable_get('taxonomy_menu_display_descendants_' . $vid, FALSE)) {
      // Use 'all' at the end of the path
      if (variable_get('taxonomy_menu_end_all_' . $vid, FALSE)) {
        $path .= '/all';
      }
      else {
        //we wait to run this instead of durning the if above
        //because we only wan to run it once.
        $terms = taxonomy_get_tree($vid, $tid);
        foreach ($terms as $term) {
          $tids[] = $term->tid;
        }
        if ($tids) {
          $end = implode(' ', $tids);
          $path .= ' '. $end;
        }
      }
    }
  }

  return $path;
}

dstol’s picture

Status: Needs review » Needs work

Could you guys please create a patch here? http://drupal.org/patch/create

marcoscano’s picture

subscribe

fotonarya’s picture

Any update ?

Quarantine’s picture

Subscribing - would appreciate it if someone could create a patch for this!

healycn’s picture

subscribe

ZuluWarrior’s picture

Definatally Sub

ZuluWarrior’s picture

Ok Guys,

Looked into this and I have a fail/win situation!

Win = I have worked out what it takes to get the solution in #9 to work under Drupal 7! details below!

Fail = I'm developing on a Windows machine, to a tight deadline so I have no time to delve into Putty, Git and making a patch file for this :( Perhaps later (it's on my Drupal nice to do list!), Sorry, anyway, instructions for zip in #9...

To Get Custom Path working:
Note: I am using Drupal 7.8, and Taxonomy Menu 7.x-1.2

  1. Download the attached zip which contains a new taxonomy_menu_path_custom module.
    (The one posted in #9 is fine but uses taxonomy_get_term() which is not in Drupal 7, so I changed that!)
  2. Extract the module and containing folder into the taxonomy_menu module folder.
    (as per the structure of v6.x)
  3. Edit taxonomy_menu.module, Find line 73 (in v7.x-1.2 of Taxonomy_Menu), where you will find a commented out line of code:
    //$form['taxonomy_menu']['options'] = _taxonomy_menu_create_options($form['vid']['#value']);
    Un-comment this line of code and save the file.
    (This line is responsible for loading the extra form elements as highlighted in #10->#12
  4. Clear your cache, and go do your taxonomy menu custom path thing!

Hope this helps someone, I will try and create a patch when I can, otherwise is someone on Linux wants to do that for me, I'd be much obliged, as would the community!

amogiz’s picture

It really did not work for me …
I lost everything, had to uninstall taxonomy menu to get it work again …
THe error I got is : Notice : Undefined property: stdClass::$language dans _taxonomy_menu_create_item() …

If I don't use the options but only the "module" menu path, noting works.
I have to stop my website if no solution …and do it again on D6 … So I am really expecting a solution :)

Nick Robillard’s picture

Fyi, for those waiting on this for D6, the Views Hacks sub-module Taxonomy Summary has been improved upon and accomplishes this almost exactly. #1199600: Custom url and record count options (Make sure to use the dev version of Views Hacks)

amogiz’s picture

Oh please, could it be possible the get the options with the custom path working ?
As i said in another post about this taxonomy menu option, in my case, i May Have ti do my website again in D6 and it's really a disaster …
Thanx

ZuluWarrior’s picture

amogiz,

Did you try a vanilla install of Drupal 7.8, Taxonomy Menu 7.x-1.2 and the above patch?

I have the feeling something is out of place as in the example I supply above I don't have a 'module' option, I only have "Default" and "Custom path" (following the patch). This makes me think you have another module in there at least?

I don't profess to being an oracle on Taxonomy Menu, but I did learn a bit with the patchwork I did a few weeks ago, so if you wish I'm happy to help where I can! Drop me a message with any detail you have (If your on any IM clients let me know which one and when your online too!), modules, version numbers ect, and I'll put some time aside one evening this week (I am in UK) to see if we can't get something working for you.

(I too am in limbo and considering a D6 rebuild (however my issues are with Media module), so I feel your pain. But Taxo-Menu shouldn't be a complete show stopper, I will help if I can!)

flexman’s picture

First of all, thanks for the work on this Zulu... I seem to be having the same issue as amogiz. I install the patch module, and un-comment the specified line of code and the menu to be displayed is removed completely. When I edit the taxonomy vocabulary, I see the "Custom path" option, but making any changes does nothing. To get the original default menu back, I need to uninstall the Taxonomy Menu module. Has anyone been able to successfully get this working?

johnv’s picture

Status: Needs work » Needs review
FileSize
4.32 KB
1.17 KB

Here's a proper patch for #20 (including a Coder review).
It contains 2 files, since the change in module-file may be already in your system for other issues.
My remarks sofar:
- the taxonomy menu path for the term page is created correctly; (OK)
- the option 'use term name' does not work: the URL-path is still base-path/tid (TODO)
- I can reset 'menu path type' from 'Custom path' to 'Default' and Save. After that my old situation is restored, (using paths created with Pathauto). (OK)
- My existing menu block for the taxonomy menu had been vanished with 'Path custom'; perhaps needs some redefinition;
- I did not create a view yet, while settings page says 'You need to have a view..'
- I do not use multilanguage

BTW: Does this mini-module have advantages above Pathauto ? , otherthen being a dedicated alternative?

I set this issue to Needs Review, hoping for a testbot review.
@amogiz, please reset to Needs Work if your issue hasn't been resolved yet.

Status: Needs review » Needs work

The last submitted patch, taxonomy_menu_1035446_26_path_custom.patch, failed testing.

johnv’s picture

Status: Needs work » Needs review
FileSize
4.3 KB
1.16 KB
johnv’s picture

-p1, -p0, haven't figured it out yet.. Anyone?

ZuluWarrior’s picture

Hi johnv,

Many thanks for working on this, I shall give it a whirl later next week and post back. Am I right in thinking that your patch also tackles (or at least has ToDo) the vocabulary as menu item problem (which is a seperate issue somewhere else in this issue queue?

regarding : "BTW: Does this mini-module have advantages above Pathauto ? , otherthen being a dedicated alternative?"

My use case requires both pathauto and taxonomy_menu + custom path. Pathauto sets the url_alias's for the taxonomy terms, but does not expose taxonomies in a menu, in my case this module fulfills that use case of exposing the taxonomy (and paths set with pathauto) to the menu, without admin intervention (using the update menu on vocabulary edit option).

johnv’s picture

Hi ZuluWarrior,
no, my patch is a straight copy of your's. I have no plans in extending it.
regarding pathauto vx path_custom: OK, I see now, the building of a menu and the creation term path are 2 separate things. You could have 2 menu's pointing to the same page.

johnv’s picture

Here's a better version of #26-#28.
It contains 2 files, since the change in module-file may be already in your system for other issues.
- didn't test translations of term names
- didn't test 'display_descendants' since that option hasn't been ported yet to D7.

rofsky’s picture

dstol’s picture

Status: Needs review » Needs work

I made a couple of commits this evening that probably affect the module.patch in #32.

brianfisher’s picture

fix #32 to work with latest 1.x

sorry about the filename, but this patch creates taxonomy_menu_path_custom.info and taxonomy_menu_path_custom.module

brianfisher’s picture

Status: Needs work » Needs review
FileSize
4.09 KB

fix warning in #35

dstol’s picture

Status: Needs review » Needs work

This needs to have tests associated with it before I commit it. http://drupal.org/simpletest

andypost’s picture

Issue tags: +Needs tests

Also code should be checked for coding standards, currently there's some trailing whitespace and code comments ... try to check this with dgo.to/coder module

+++ b/taxonomy_menu_path_custom.module
@@ -0,0 +1,103 @@
+
+// $Id: taxonomy_menu_path_custom.module,v 1.1.2.6 2009/10/31 18:39:33 indytechcook Exp $

is not used after git migration

+++ b/taxonomy_menu_path_custom.module
@@ -0,0 +1,103 @@
+ * Implementation of hook_taxonomy_menu_options().

Should be Implements hook_

+++ b/taxonomy_menu_path_custom.module
@@ -0,0 +1,103 @@
+/**
+ * Implementation of hook_taxonomy_menu_path().

the same

+++ b/taxonomy_menu_path_custom.module
@@ -0,0 +1,103 @@
+  //if tid = 0 then we are creating the vocab menu item format will be taxonomy/term/$tid+$tid+$tid....

needs space after // and coment should not be wider 80 chars

+++ b/taxonomy_menu_path_custom.module
@@ -0,0 +1,103 @@
+  ¶
+  if (variable_get(_taxonomy_menu_build_variable('taxonomy_menu_path_custom_use_term_name', $vid), FALSE)) {
+    $tids = ($tids) ? $tids : array($tid);
+   ¶
+    foreach ($tids as $tid) {
+      $term = taxonomy_term_load($tid);
+      $names[] = strtolower(str_replace(' ', '-', $term->name));
+    }
+    ¶
+    $path = $base_path . '/' . implode(' ', $names);
+  }
+  ¶

trailing whitespace

1800collect’s picture

Subscribing.

P.S. Thanks everyone who is working on this! If I could read the patch code I'd try it out myself. One step at a time and I may be savvy enough for it.

carn1x’s picture

Can anybody comment whether these patches are actually working? I'm a little confused by the fact there are 2 patches almost identical, I assume only one is required?

Either way, I've tried to use each deploying manually alongside 7x-1.2.

Both provide a "Custom Path" option on the Vocabulary edit page, but beyond that, they fail to provide any additional form items to customize the path, which means I guess they don't work.

I'll try with 7.x-dev as well.

carn1x’s picture

Ok, tried now with 7.x-1.x-dev, and using Custom Path option simply causes the menu to disappear. Switching back to Default makes the menu appear again.

carn1x’s picture

Ahh right seems I wasn't reading the instructions for base path and was entering 'path/%' instead of just 'path' :) All working fine now.

fonant’s picture

This works for me, enabling custom menu paths, by doing:

  1. Download taxonomy_menu-7.x-1.x-dev
  2. Apply patch from #36
Ashlar’s picture

I've been working on the same function as is modified in the patch at #36. The purpose of my exploration is to change the path of individual links depending upon the value of field attached to the taxonomy term. So far every attempt has generated the same path for all terms. I find this confusing. My read of the function is that it is assigning the path to each individual link item, but the results don't work that way. Can anyone shed a little light on this. Should I be testing the tid and modifying the path at some other location in the module. I tried it in _taxonomy_menu_save interpreting the code as saving an individual item in the menu, but ended up with all links with the same ending. Am I misinterpreting how to change individual paths?

This code shows the modification I was attempting. Thanks for any comments!!

function taxonomy_menu_path_default($vid, $tid) {
  //if tid = 0 then we are creating the vocab menu item format will be taxonomy/term/$tid+$tid+$tid....
  if ($tid == 0) {
    //get all of the terms for the vocab
    $vtids = _taxonomy_menu_get_terms($vid);
    
    
//ADDED CHECK STATUS OF A TERM
    foreach ($vtids as $term_id) {
      //get the term
      $term = taxonomy_term_load ($term_id);
      dsm($term);         
     //read the status field
      if (strcasecmp ($term->field_display_type, "Summary") == 0) {
        $statuspath = '/summary';
      }
      else {
        $statuspath = '/content';
      }
      $term_id = $term_id . $statuspath;
    }
//END ADDED
        
    
    
    $end = implode(' ', $vtids);
    $path = "taxonomy/term/$end";
  }
  else {
    $path = 'taxonomy/term/' . $tid;
    if (variable_get('taxonomy_menu_display_descendants_' . $vid, FALSE)) {
      // Use 'all' at the end of the path
      if (variable_get('taxonomy_menu_end_all_' . $vid, FALSE)) {
        $path .= '/all';
      }
      else {
        //we wait to run this instead of durning the if above
        //because we only wan to run it once.
        $terms = taxonomy_get_tree($vid, $tid);
        foreach ($terms as $term) {
          dsm($term);
//ADDED CHECK STATUS OF A TERM
          //read the status field
          if (strcasecmp ($term->field_display_type, "Summary") == 0) {
            $statuspath = '/summary';
          }
          else {
            $statuspath = '/content';
          }
          // Delete line $tids[] = $term->tid;          
          $tids[] = $term->tid.$statuspath;
//END ADDED          
          
        }
        if ($tids) {
          $end = implode(' ', $tids);
          $path .= ' '. $end;
        }
      }
    }
  }

  return $path;
}
liats75’s picture

The patch from #36 works for me also. thanks!

ZuluWarrior’s picture

Hi all,

Thanks to johnv and tbfisher for rolling those patch files up for us.

Sorry but I think there is a critical line missing from it though. My origional suggestion mentions in #20 mentions the need to uncomment a line in taxonomy_menu.module, so that the 'custom path' options are displayed, allowing the user to set the costom path and other options such as include parent and include all ect.

Basically all thats needed is line 73 of taxonomy_menu.module (7.x-1.2) needs 'uncommenting'. Change :

    //$form['taxonomy_menu']['options'] = _taxonomy_menu_create_options($form['vid']['#value']);

to

    $form['taxonomy_menu']['options'] = _taxonomy_menu_create_options($form['vid']['#value']);

and the form comes back. Agree there probably needs to be a test set before commiting, but can't we copy the custom path tests for 6.x? After all its almost the same module!

Anyway, thanks again guys, after doing the above I find taxonomy_menu_custom_path working well with my latest 7.12 site.

Jim Ruby’s picture

subscribing, thanks to all who is working on this.

jmann8888’s picture

Priority: Normal » Major

Hi, Im not quite sure how to apply a patch, but i do know that what is on this page is what i want of my drupal site, if someone could pump out this module with all these patches applied, that would be VERY MUCH appreciated.

Thank you in advance :)

westbywest’s picture

@jmann8888 To patch the module at the command line in an OSX/Linux/*nix enivornment, I downloaded the patch attached to comment #36 to the taxonomy_menu module's directory and then ran the patch command:

blah/blah/blah/sites/all/modules/taxonomy_menu$ patch -p1 < taxonomy_menu-1035446-36-path_custom.patch 
patching file taxonomy_menu_path_custom.info
patching file taxonomy_menu_path_custom.module

More info:
https://drupal.org/node/60108

nirad’s picture

I couldn't get this to patch (#36) to work for me. Could it be related to the fact that I have the Entity Path module installed? It doesn't seem like this module checks for the actual path, so I don't see how that would effect it. OTOH, it could be worth looking at that module as an example of how this module could work.

MrPaulDriver’s picture

Also struggling.

My first attempt at patching and thought I'd done everything correctly but still only seeing the default path.

As with #48 it would be most helpful if someone with a bigger brain than myself could roll this out to dev.

MattBrigade’s picture

I managed to come up with a workaround to the custom path issue while this patch gets committed. I created a simple custom module called "taxonomy_menu_mods". Inside taxonomy_menu_mods.module I called hook_menu_link_alter() to alter menu item paths being saved by Taxonomy menu.

Here's an example of how I used hook_menu_link_alter(). This example was used for the vocabulary I named "Portfolio" (with a VID of 2). I needed to changed the path to go to "project-portfolio/%term-name". I hope this example makes sense and you're able to modify it for your own use case. I can further elaborate if anyone would like me to.


/**
 * Implementation of hook_menu_link_alter()
 **/
function taxonomy_menu_mods_menu_link_alter(&$item) {
  // Change taxonomy menu link path ONLY for Portfolio terms (vid of 2)
  // Check if menu link was created by Taxonomy menu
  if($item['module'] == 'taxonomy_menu') {
    // Make sure the default term path is what we expect
    if (preg_match('|^taxonomy/term(/.*)|', $item['link_path'], $matches)) {
      // Get the term tid from the menu path
      $tid = substr($matches[1], 1);
      // Load the term object
      $term = taxonomy_term_load($tid);
      // Does the term belong to the "Portfolio" vocabulary (with a vid of 2)?
      if($term->vid == 2) {
        // Make term name URL-friendly
        $term_name_machinefreindly = strtolower(str_replace(array(' '), array('-'), $term->name));
        // Update menu menu link
        $item['link_path'] = 'project-portfolio/' . $term_name_machinefreindly;
      }
    }
  }
}

stuhannaford’s picture

Can confirm dev + #36 work. Thanks for everyones help on this one.

Tried with 1.2 without any joy and had to manually create the path_custom.info file just so that the custom option was displayed. Even then there weren't any options to actually create a custom path.

I had a slightly different requirement to the argument based option where I wanted the menu items to link through to an exposed filter in views, i.e. 'base path/store?tid=%'. As the module automatically added the trailing slash, I manually removed '/' from lines 70 and 73 (e.g. $path = $base_path . '/' . $end;) in path_custom.module which allowed me to do this. Is it worth removing that slash from the patch so that it gives people the option to add it or not as opposed to hacking away at the patch?

All up and running at www.prettyformal.co.uk if anyone wants to see

rc_100’s picture

I downloaded the dev version and applied patch from #36, however I got an error after saving a node with a taxonomy term attached ($tids variable on line 92 of taxonomy_menu_path_custom.module). Seems to work fine after I change that line from this:
$tids = ($tids) ? $tids : array($tid);

to this:
$tids = (isset($tids)) ? $tids : array($tid);

I assume that's because I only had one term in my vocabulary!

MrPaulDriver’s picture

Did a solution to this issue get committed to latest dev of 2012-Jul-19?

Barrett’s picture

No, an explicit fix has not been committed. The latest patch still needs work, as discussed in comments 37 and 38.

Anonymous’s picture

Thanks @mattbrigade #52 worked well for me as a temporary workaround until this patch gets committed. A bit off topic, but a couple of tips that would have just saved me an hour: 1) hook_menu_link_alter() only gets called when you save a menu, not when you render one on a page, and 2) you can't add URL arguments in $item['link_path'], you have to add them separately like this:

$item['options']['query']['ARGUMENT_NAME'] = 'ARGUMENT_VALUE';

melvix’s picture

#52 worked for me, too.

To expand on what jackocnr said in #57:

1) hook_menu_link_alter() only gets called when you save a menu, not when you render one on a page

After you add your version of hook_menu_link_alter(), you will probably need to visit the edit screen for vocabulary you're using (admin/structure/taxonomy/vocabulary_XX/edit), check "Select to rebuild the menu on submit" and re-save.

Anonymous’s picture

#36 + #54 worked for me with Taxonomy menu 1.4!

But then I couldn't find a way to make it work with "Taxonomy Menu Trails" module... Anyway thank you guys for your work!

clashar’s picture

#36 works well for me with Taxonomy menu 1.4.

johnv’s picture

After updating to Taxonomy menu 1.4, and implementing #36, I got the following warning when editing a node with a relevant Vocabulary:
Fatal error: Call to undefined function taxonomy_menu_path_custom_create_path() in .../taxonomy_menu/taxonomy_menu.module on line 724

I fixed it by going to the vocabulary-edit page and save the page.

pointdexter02’s picture

For those of you that got it working with 1.4, what did you need to do?

I did it manually by creating the 2 files in the taxonomy menu folder and then looked at the main module code, but that line is not commented out. I'm not getting any extra options in my settings.

Am I missing something?

kmare’s picture

Hello,
I just wanted to report that patch #36 worked like a charm for me without any problems. It would be awesome if it could be applied on a released version.
Thank you!

@pointdexter02: just apply the patch, no need to mess with any line or so. Just set your custom path and you should be good to go. Not sure if it's really needed, but just to be sure clear your cache.

hles’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Priority: Major » Normal

Patch needs to be ported to 7.x-2.x and provide tests like dstol said previously.

monstordh’s picture

The patch didn't work for me. Custom menu paths for my taxonomy is the primary reason I use this module. Now, since (reluctantly and regrettably) migrating to D7 I have completely lost a central component in my functionality. Are there any plans on getting this fixed soon?

hles’s picture

What needs to be done:
- Port the patch to 7.x-2.x, there are not a lot of modifications to do really (http://drupal.org/node/1035446#comment-5321920)
- Fix the Drupal coding standard issues (http://drupal.org/node/1035446#comment-5324210)
- Add some tests

Any help would be appreciated on this one as we are already working on making stable the 2.x version of Taxonomy Menu.

brianfisher’s picture

ported to 2.x branch

hles’s picture

Thank you tbfisher ! I created a new patch taking advantage of the hook introduced in commit 5f92314. Tests have not been reviewed at all.

hles’s picture

- Added validation so it can detect whether a path is registered.
- Added states to the "custom path options" fieldset in order to make it disappear when custom path is not selected.
- Fixed a few things in tests but they are still not passing for now.
- Removed the "use term name" option for now, but will add it again later.
- Fixed typos, added more comments.

It would probably work fine enough but this is still work in progress.

pointdexter02’s picture

Looks like some may have had the same issue I am and I'm wondering if it's been figured out. I got the patch working and when I switch to custom paths to get it to use catalog pages as the link url's, all of the catalog items disappear from my menu. Then when I put it back to default, they come back. The thing is, it's not just on the page display of the menu. If I physically go in and look at the menu list items, all of the catalog items are gone. The only thing that displays are the items I added to that menu, not associated with the taxonomy terms. Any thoughts? Thanks!

hles’s picture

Assigned: Unassigned » hles

Thanks for testing the patch. Your problem is probably due to the fact that your custom path is not available in Drupal. For example, if your base path is 'catalog' and you don't use the depth setting, you must have the path catalog/% registered in Drupal (by creating a page view for this path for example). With the depth setting, it would be catalog/%/%.

I have an newer version of this patch that will check that the paths exist before creating the taxonomy menu, during the form validation process. I'll post it later today probably.

hles’s picture

Status: Needs work » Needs review
FileSize
14 KB

- Fixed existing tests
- Added functional tests
- Added validation of custom paths so a taxonomy menu is not created if the custom path in the options is not yet registered

pointdexter02’s picture

Alright, I really appreciate the info hles. Now I have a new issue. So I got the taxonomy menu links to work properly in going to catalog pages. i.e. catalog/product, but when I click on the links, the page that's displayed is no longer the list of products, just a list of:

taxonomy 1
Term ID: 11
taxonomy 2
Term ID: 8
taxonomy 3
Term ID: 10
taxonomy4
Term ID: 9
taxonomy 5
Term ID: 15

Which doesn't change for any of the different pages in the list. It seems to have broken the standard catalog block as well. What do you suppose I did?

hles’s picture

Can you tell me which settings you have in taxonomy menu ? Base path and depth ? And also the exact path that is generated in your taxonomy menu links ? If all that is correct, then it's probably a problem within your view, but let's check taxomy menu first.
Thanks for testing btw !

hles’s picture

Assigned: hles » Unassigned

Unassigning from myself as I won't be able to work on this for a few days.

pointdexter02’s picture

Thanks hles. It was, in fact, an issue with my view. Not sure how it got all screwed up, but it's good now. My only issue left to solve to make it perfect is that in the menu, when I click a product category, it doesn't expand the menu item. If I check box the expand all, everything's expanded and all links work perfectly, but that won't work for me in the long run. Any thoughts? Thanks again.

hles’s picture

I'm not exactly sure what behavior you expect, but it looks like your problem could be solved by Taxonomy Menu Trails.

That would be great to have some feedback from one more person so I can eventually close this issue, commit this code in the 7.x-2.x branch and release an alpha2 version with all the latest improvements.

hles’s picture

- Moved helper module for paths registration to taxonomy menu 'tests' folder.
- Added missing new lines at the end of files.

hles’s picture

Commited helper module for paths registration in 7.x-2.x branch. Updated patch.

hles’s picture

Issue tags: -Needs tests

Removing tag.

brianfisher’s picture

tested latest patch, looks great. Thanks hles!

pointdexter02’s picture

I am under the impression that the behavior I want is covered under menu trails as well, but I just can't seem to link the two up. If I leave the menu on default (taxonomy/term/tid) The active trails on the menu will expand sub-categories as I would expect, but when I switch over to a custom path (catalog/%), the active trail doesn't follow and only the top level will display in the menu when clicked. I've set the menu trails option to "ask taxonomy menu" for paths and tried everything else I can think of.

hles’s picture

@tbfisher thanks for testing !

@pointdexter You should try posting an issue in Taxonomy Menu Trails issue queue and see what the maintainer has to say about it. I have no clue how that module works and maybe he could solve the problem or at least point you to a direction to follow.

pointdexter02’s picture

Much appreciated. Will post if I figure out the solution.

hles’s picture

Status: Needs review » Fixed

Patch #79 commited with some small modifications. Thanks to everybody for working on this !

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

wmad’s picture

For those who are looking for a solution for 7.x-1.x, check out http://drupal.org/node/1516146
The solution involves installing the taxonomy_display module: http://drupal.org/project/taxonomy_display

giupenni’s picture

I've installed 7.x-2.0-alpha2 but I can't set Base path for custom path.
Any path that I insert I have this message:
"The path catalog/% is not available in Drupal. This is required to use custom paths."

brunorios1’s picture

@giupenni,

install the dev

giupenni’s picture

In dev version I can't enable taxonomy menu custom path, in admin/structure/taxonomy/catalog/edit I show only Taxonomy Menu module and not Taxonomy menu custom path.
Infact when I configure the module, in Menu path type I can select only Default.

brunorios1’s picture

have you enabled the module taxonomy menu custom path?
cleared the cache?

giupenni’s picture

Yes.
I'm using Ubercart and I must make a menu for Catalog, I'm trying to use this solution http://drupal.org/node/919944#comment-3483120 but when I insert "Catalog" in Costum path I have this error:
"The path catalog/% is not available in Drupal. This is required to use custom paths."

The catalog path exists.

bortolotte’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha2

First, thanks to all who are supporting this "Custom menu path" porting for D7.

I've tested 7.x-2.0-alpha2 version and it "seems" to work. i.e. the "Custom" option is now available.
However, I say "seems" to work, because I couldn't put it to run, once the 'Custom' option in "Menu path type" requires a '<base_path>/%' URL, whose wildcard ('%') does not allow Views to be added to Menus in "Views > Displays > Page Settings > Menu".
To make it clear, this is what I want to do in my site:

Item type Menu entry link URL
Main Menu My Content View <site>/content_view
Sub Menu Taxo Term 1 <site>/content_view/<tid1>
Sub Menu Taxo Term N <site>/content_view/<tidN>

Maybe if Custom menu path used Token module support (e.g. <base_path>/[term:tid]), this problem would not happen when trying to add Content View to Main Menu, once no '%' would be used in Views page address.
Does it make sense to you guys? If so, could anybody implement this Token module support in Taxonomy Menu?

I'm a bit new to Drupal, so, please anyone clarify my thoughts in case I'm missing something.
Thank you very much!

DigitalFrontiersMedia’s picture

I think your problem is that you need to make sure the Views Page display uses the same path (/%) and you ONLY enter into the "Custom Path Options since the '%' is filled in for you by tm_custom_paths.module as Term ID.