It would be nice, if pathauto support multiple categories.

I mean, if taxonomy/term/1 is alias to topic/foo , and taxonomy/term/2 is alias to topic/bar,

topic/foo+bar should be alias to taxonomy/term/1+2, and topic/foo,bar should be alias to taxonomy/1,2

Comments

greggles’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Active » Postponed

I have some basic concerns with this concept:

If you have a vocabulary with 10 terms in it (a relatively modest one) then creating all of the possible + and , combinations would be 10 factorial * 2 url_aliases. That would be very sad. So, this would be a "use with extreme caution" kind of a function. In order to limit that we'd need more UI cruft of "how many combinations should be created.

I'm marking as postpone because I don't plan to work on this because I don't think it's valuable and the implementation would be visually distracting and potentially dangerous. If someone else comes up with a good implementation I will consider applying the patch.

AstralP’s picture

The way I dealt with this problem in the past with 4.6 was to hack the pathauto files and add /all to the end of the /taxonomy/term/xx when pathauto adds the alias. This seems logical to me as it then is just one alias which makes hierarchical sites function as expected. I had forgotten about this until now after upgrading to 5. I have just had a look and pathauto has changed a lot since then, and the task looks a bit complex for me at the moment timewise. I would ideally like to see this as a checkbox at the category section. Adding /all doesn't leave as much scope as what you describe above, but it will make a big difference with no overhead. If I get the time I will give it a go..

greggles’s picture

AstralP - thanks for the details on your setup. If you can provide the change you made as a patch file (http://drupal.org/diffandpatch ) I can see about integrating it into the 5 branch.

Also, can you provide an example of your "/all" idea? Is that just taxonomy/term/19/all ?

Thanks!

AstralP’s picture

Hi Greggles

I've made the changes to v5 and submitted the hacked versions to the issues queue which you may have missed, I will add the patches there..

The /all is as you describe. Consider the following:

Main Category
--Sub Cat 1
--Sub Cat 2

When using the current alias generated by pathauto, the Main Category alias will only display nodes which are in Main Category whereas if the alias had eg; 'taxonomy/term/19/all' the sub categories nodes would also be displayed. You can see this in action on http://www.neuworldorder.com with the Videos category. This is the drupal 4.6 site I spoke of earlier, the top left menu dynamically generates an alias based menu.

thanks for considering adding this, it would mean I can release the menu module without requiring any hacks :)

I'll add the patches to the other issue: http://drupal.org/node/113193

greggles’s picture

astralp - while related I think your ideas are basically on a different point than this issue. this issue is just about creating aliases for the combinations/permutations of taxonomy terms and not about the /all. They're related, but different (e.g. the /all might get in but this issue will take some real discussion/testing before it's done).

AstralP’s picture

I understand. I hope that the /all option does make it in, from the way I use Drupal I've never understood the point of a category not displaying its subcats nodes, but I know there must be good reasons I am unaware of due to the flexibility of categorization. The best option all round would be to be able to choose this in the drupal core on the vocab options page, as I feel it is an oversight of drupal not pathauto.

I'll try and get around to figuring out the patches tommorow.

thanks
Andy

vkha’s picture

Status: Postponed » Active

Oh, this is really a pity to upgrade to pathauto and have the tag combination feature dropped :(

till I have found this issue, I hoped it should work somehow (even tried to turn off punctuations for "," and "+")

Gurus, any1 can give an update to this issue, please?

Thanks!

greggles’s picture

Status: Active » Postponed

The feature request remains postponed (unless you plan to work on it). It was never implemented in 5.x, so I'm not sure what you mean by the feature being dropped.

chrsc’s picture

Not sure if this is the same request, but I thought I would place my comment here first.

Currently when I have a node that belongs to two different Vocabularies:

alias1 = term1/title = node/1
alias2 = term2/title = node/1

I would like the ability to have this url alias:

alias = term1/term2/title

In the particular instance I have two vocabularies one to categorize a section the node belongs to, the other for the location (city) of the node belongs to ie:

alias = city/section/title-of-node

If this is already possible I apologize for posting here.

greggles’s picture

I think that's the same feature request. Unfortunately it's not done yet.

TrinitySEM’s picture

subscribe

dave reid’s picture

Status: Postponed » Closed (won't fix)

I don't think this is worth implementing. We've removed the multiple term functionality from D7, so it would only be supported for the D6 version.

rickvug’s picture

Sounds like an excellent idea of a separate contrib module. You would want to build in controls for which aliases to create as we're talking about a massive explosion in created aliases here.