Use term names and term ids in paths

trevorleenc - February 27, 2008 - 20:09
Project:Faceted Search
Version:6.x-1.x-dev
Component:Taxonomy Facets
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

Is it going to happen, or has it happened and I missed it, that aliases will get used instead of the termid when using path and/or pathauto?

so that this: /faceted_search/results/taxonomy:49
would look like this: /faceted_search/results/taxonomy:antiques

I saw that this worked (I think) for content types...but not taxonomy terms.

thanks

AWESOME Module by the way...

#1

David Lesieur - February 28, 2008 - 23:16
Version:5.x-0.11» 6.x-1.x-dev

There was no plan for this so far, but let's keep it as a feature request. ;-)

If this gets done, it will have to be implemented within Faceted Search because those paths are user-generated, not something path and pathauto can handle.

#2

alsears - May 14, 2008 - 20:56

I agree that this could be a really valuable feature addition, both from a usability perspective and from Search Engine Optimization.

#3

bruceclothier - May 22, 2008 - 15:37

Hi David,

Great module. Any chance this is going to happen anytime soon? I've written a script which just generates a whole bunch of url aliases. Would what you create do anything different? I've used the pattern of %3A,%2C... ( /taxonomy%3A1%2C975%2C971 ) and just generated every combination of possible request. Turning them into /tax1/tax2/tax3. Its already a huge number of aliases on a small number of taxonomies. Did you have a more clever plan in mind? I'm sure you did, could you perhaps point me in a clever direction to help me solve this url problem?

Many thanks.

#4

David Lesieur - May 22, 2008 - 17:50

The number of combinations is exponential, so it is probably not a good idea to pre-build all possible aliases, unless you have a really small number of terms. Also, such scheme will break (in the sense that the alias won't be used) as soon as a keyword is also included in the search text.

As previously explained, it would need to be done from within Faceted Search.

We'd need to output term labels into the query string (instead of ids), and search queries would have to search directly from the labels. That raises all sorts of transliteration issues and could further complicate the SQL queries. I'm not convinced that we want to go that way...

#5

alsears - June 2, 2008 - 03:36

Yeah, that's understandable about the level of complexity of create aliases for multiple levels. I wonder if it might be less complex if you limited the aliases to one or two levels.

The main reason for this is that, we use faceted search in our left site navigation (see: http://www.urbanministry.org/frontpageview). For SEO purposes, there is a significant advantage of having the term in the URL.

However, I understand that to do this either would be (1) very complecated or (2) would result in an incomplete solution only going to one or two layers deep.

#6

pawshaker - June 2, 2008 - 07:56

I did not understand all of the discussion above, but just wanted to be sure: wouldn't it be possible to have both id and term in the url?

Example:

current: /faceted_search/results/searchkeyword+taxonomy%3A98%2C1822+content_type%3Accontenttype name

seo: /fsr-searchkeyword-taxonomyterm1-taxonomyterm2-ccontenttype name-taxonomyid1-taxonomyid2

(having all content directly below the root is my personal preference)

#7

bruceclothier - June 3, 2008 - 14:49
Status:active» won't fix

Unfortunately the only way around the default urls is with alias at this stage.

#8

David Lesieur - June 18, 2008 - 14:20
Title:Pathauto & Taxonomy Terms?» Use term names instead of term ids in paths
Status:won't fix» active

Let's keep this as a feature request. Perhaps we can come up with a clean solution at some point.

#9

a_c_m - July 24, 2008 - 11:55
Title:Use term names instead of term ids in paths » Use term names and term ids in paths

I would also be interested in this. Perhaps there is a compromise to be found, e.g. having both the name of the taxonomy term and its ID in the path... e.g.

current : /faceted_search/results/taxonomy%3A19%2C393%2C209

Which is searching for : wrasis, kiwreuabe, uepit - becomes

/faceted_search/results/taxonomy%3A19-uepit%2C39-kiwreuabe3%2C209-wrasis

No need to worry about translation or other issues as you can still use the id for the search, just keeping the text there for dumb humans and SEO :)

What do people think?

a_c_m

#10

Jurgen8en - October 6, 2008 - 17:21

Hi,

For seo, I think it is a good solution to make an alias for the first level.
Add a nofollow for two or more levels.

Jurgen
www.iGadgets.be

#11

vorbian - December 4, 2008 - 19:21

What about the %3A and %2C HTML codes that appear in the url as replacements for the comma "," and colon ":" characters in the url? Aren't these also bad for SEO?

Our SEO firm seems to believe that they are bad.

Is there any way to easily replace these separators with something like underscores "_" or "+" or "-" ?

#12

alsears - December 4, 2008 - 20:36

We finally did a combination of manually creating aliases for faceted search paths and redirects for our top facets. See example at: http://www.urbanministry.org/tag/john-perkins

It seems like there could be a fairly easy way to automate this at least at least for top level of the facet hierarchy.

#13

David Lesieur - January 10, 2009 - 17:33
Status:active» postponed

alsears' approach is a compromise, but for now it is the way to go.

I think it is a very acceptable compromise, since search result pages are meta tagged "noindex" when more than one facet is active, making it useless to have nice SEO URLs in those cases. Single-term result pages are the only ones being indexed, and can easily be aliased.

I also don't think we should venture into managing tables in Faceted Search for matching term names to term ids and ensuring that all names are unique. Such generic task should be handled by another module. So let's postpone this at least until some other module provides us with the necessary tools.

#14

emptyvoid - June 23, 2009 - 21:02

Maybe I am a little dense here but would you just call drupal_get_path() or drupal_get_path_alias()

Or better yet detect if the (pathauto) http://drupal.org/project/pathauto module is installed and piggyback on the pathauto_taxonomy($op, $type, $object = NULL) or the _taxonomy_pathauto_alias($category, $op) function?

The module has path aliasing for nodes, taxonomy, and users..

#15

eiland - September 22, 2009 - 11:41

Hi,

Im not so much in the drupal these days, but in wordpress, all the categories don't mean anything, they are just for show.

The only thing that matters is the name of the article. So /faceted_search/1951/authors/salinger/The_catcher_in_the_rye would be the same as /faceted_search/The_catcher_in_the_rye or /faceted_search/salinger/1951/The_catcher_in_the_rye

Then the module's rewrite engine could just ignore all the tags and display the proper article. No need for exponential database clutter.

My 3¢.

 
 

Drupal is a registered trademark of Dries Buytaert.