Attached is a patch that allows the Term Name(s) instead of the Term ID(s) to be used in the output of Custom Path menus. A checkbox is added to the configuration options, allowing you to confoigure this behavior per vocabulary. I needed this ability for improved SEO and organization. Hope others find it useful!

~ Brice

Comments

indytechcook’s picture

That looks good. Can more people test and I can apply to the 6.1 branch.

indytechcook’s picture

Version: master » 6.x-2.x-dev
Status: Patch (to be ported) » Needs review

I applied the patch to the D6-2 branch. Needs to be tested.

brice-dupe’s picture

Note that the "Use Name instead of ID" feature will:

A) replace spaces in the name with dashes ("-")
B) output the name in lowercase

I found this works well with Argument Handling in Views -- particularly using the Taxonomy ID Argument with the built-in Validator that transforms Term Names to ID combined with "convert dashes in URL to spaces" being checked.

Further testing needs to be done on Term Names containing special characters and quotes (single quotes work fine), as well as nested vocab terms [I'm not even sure if there's a handler for this]. My guess is that we'll want to remove space->hyphen conversion as well as wrap the name in htmlentities($name,ENT_QUOTES).

Would love to hear any feedback.

pheno’s picture

StatusFileSize
new28.75 KB

It seems this functionality is available in the currently availble version, but i can't see how to enable it, i can't see the checkbox when going to the taxonomy settings for a vocabulary. Must i reinstall it or is the setting being kept elsewhere?

Or must this patch be applied? in which case what did this statement mean?
'I applied the patch to the D6-2 branch. Needs to be tested.'

This clearly is a very good thing making a lot of sense to the purpose of taxonomy menus.

Some clarification on how to install it, wether its part of the current module download and perhaps views integration if necessary.

the basic essential would be to enable or find this 'checkbox'.

indytechcook’s picture

It is committed and should be part of DEV version. http://drupal.org/cvs?commit=218918

pheno’s picture

Could you confirm the checkbox is suppose to appear in the settings for the vocabulary?

I'm not sure what might be preventing it from showing up as all other options in my pic grab for taxonomy menu are there.

I can uninstall it and reinstall it, but would like to be sure it's needed tho. Is the option suppose to show up elsewhere?

Thanks for getting back to me. Just a quick response to clarify where the option should be found plz.

*edit

--- PART OF DEV VERSION ---

right, i'm with you now, this is fantastic, awesome.

indytechcook’s picture

Status: Needs review » Reviewed & tested by the community

Adding to next realease

indytechcook’s picture

Status: Reviewed & tested by the community » Fixed

Added to 2.4-beta1.

capellic’s picture

Version: 6.x-2.x-dev » 6.x-2.4-beta1
Status: Fixed » Active

I've been trying to get this setup for a while now with no luck. I have all of the Taxonomy Menu modules enabled. I keep on getting each of my terms with the properly "custom path for vocabulary", but the term is the human-readable term. Given my settings below, my understand is that it should be the tid (term ID). (I also trued it with "Use Term Name" checked with no change.)

Here are my settings:

Menu: Primary Navigation
Menu Path Type: Vocabulary path
Base path for hierarchy path: category
Custom path for vocabulary: business-directory
Use vocabulary path as base path: checked
Base Path for Custom Path: category
Display Depth in Custom Path:
Use Term Name: unchecked
Syncronise changes to this vocabulary: checked
Display Number of Nodes: unchecked
Hide Empty Terms: checked
Item for Vocabulary: checked
Auto Expand Menu Item: unchecked
Display Descendants: unchecked
Use 'all' at the end of URL: unchecked
Select to rebuild the menu on submit: unchecked

arlinsandbulte’s picture

Assigned: brice-dupe » Unassigned
Status: Active » Postponed (maintainer needs more info)

@capellic
Are you still having your issue?

capellic’s picture

Status: Postponed (maintainer needs more info) » Fixed

@alarinsandbulte (#10)

I never went back to check on that particular install, but I can report that I am using 2.4-beta3 on another project and I successfully using the term in the path with dashes in place of spaces.

Status: Fixed » Closed (fixed)

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