I know this is a highly controversial issue. In my site in progress I have made a highly path dependent page layout - to the point where you think you are not on the same site anymore if you are in a subpath (this is a very conscious design decision as there are multiple different things going on at the site). Now the problem arrises when I want my content to appear under more then one category. I read in the documentation that pathauto always makes a path based on the heighest weight category (if your path is category based) - now that this is a bad choice is obvious because you can not reweight on the fly and some content has a home in categoryweight2 rather then categoryweight1, but its even more devestating when you have totally different page layouts based on the path and a piece of content you want to appear under multiple terms but also inside those layouts. I understand that the throught process to make a multiple alias path work is highly complicated and that there has not been a solution for this (but I am relieved to have found out that I am in no way the only person with this thorny issue).

After mulling over it I have a solution that would satisfy me and maybe others - but I have no clear plan on how and where this would be implemented. Also I am using the controversial category plugin so my terminology might be a bit off but the general idea should be similar in a non category module drupal installation. Anyway here is how I would like to see it work:

Lets say we have the following site structure:

ContainerONE
-CategoryC1ONE
-CategoryC1TWO
--NodeTest
-CategoryC1THREE

ContainerTWO
-CategoryC2ONE
--NodeTest
-CategoryC2TWO

Container THREE
-CategoryC3ONE
--OtherNode

So Pathauto would generate two aliases for NodeTest. In each one it would store the respective Container ID

so NodeTest would have the following two aliases

/ContainerONE/CategoryC1TWO/NodeTest
/ContainerTWO/CategoryC2ONE/NodeTest

Now how does drupal know which alias to use? Well I think the answer is very obvious and simple:
If the node gets called from inside ContainerONE then the ContainerONE alias is used if it called from inside ContainerTWO then the second one is used. If it gets called from a container that does not have the node inside it then a "preferred" path is used that you should be able to set when creating the node with a default behavior to how it works now (the one with the highest weight is used).

In my current situation the only way I can make my site work is duplicating nodes and that sucks bad and is not in the spirit of drupal in general. Now lynch me for my ideas rip them apart but please take a serious look at the underlying issue and you might see that the current system is not adequate for multipurpose nodes on path layouted sites and there does not seem to be a solution.
I would be delighted to hear that to implement this somehow we do not have to wait until drupal 10 in 100 internet years but it could be possible in Drupal 5 ;)

I am imagening that some of the work has to be done in pathauto and some of it in path alias and maybe even some of it category (if used) or drupal core (if category is not used), but since I am dumb as shit when it comes to complex php programming I look at all of this code like a 1 year old must look at a book.

So my question is: Is this unreasonable to aks for? Is there a flaw in my theoretical approach above (SEO a problem?)? Could this be implemented by a smart person? Who would I ask for implementing this?

Comments

greggles’s picture

Status: Active » Closed (won't fix)

If the node gets called from inside ContainerONE then the ContainerONE alias is used if it called from inside ContainerTWO then the second one is used. If it gets called from a container that does not have the node inside it then a "preferred" path is used that you should be able to set when creating the node with a default behavior to how it works now (the one with the highest weight is used).

Please remember that Pathauto is just a convenience module around the core path module. This functionality that you describe is fundamentally different than the way that path aliases work. It would require changes to several core functions.

About the problem of lowest weight terms, there is an issue in the token queue to allow the admin to have greater control over which term is specified by the [term] token. Something like [term: vocab="9"] or something like that. http://drupal.org/node/185446

About the idea in general - it is considered to be an SEO and usability mistake to provide the same content at multiple URLs. It confuses normal users and search engines alike. There is also the user interface problem of specifying which taxonomy terms should be used in this system and which shouldn't.

So, there are several reasons why this can't be done in Pathauto alone, why some of the problems are being addressed elsewhere, and why the parts that can be done in Pathauto are, in my opinion, bad ideas. Hence, I mark this as won't fix.

falk_g’s picture

Thanks for the reply. I understand that it probably would need some underlaying core functionality to get it to work.

I have read the other reasons elsewhere already and I consider them lame. SEO I can not comment on because I have not enough insider knowledge about WHY this is bad (I mean I see the same content on different URL ALL the time - as in a news report is 1:1 copied by multiple blogs f.e.) just because its on the same main URL doesn´t mean it doesn´t deserve multiple pathes - but I guess that is for google to "fix" ;)

Generally in my case I have basically 5+ different sites on the same domain that are cross referencing each other. All have different layouts but all are interlinked (search across the site). All have their own taxonomy nesting (made easy by the category.module).

I do not see where it confuses the user when the user originally thinks he is surfing different - but interlinked sites - when a blog entry appears under /subsite1/blog/entry1 and /mainabout/blog/entry1 if the interface the whole feel is completely different - just the content is the same.

For example I have a main "collective" blog that lists some of the blog entries from the user blogs. The user blogs are styled towards the users likeness the "collective" blog has - of course - a corporate identity layout. No way to do this scenario without duplicating the content itself, because I can not see where the reader is coming from - since I don´t want the reader to leave the usage scenario he was in (either browsing the whole collective website made up of the individual users content or the individual users pages).

Also I absolutely fail to see where a path can be "bad usability" becausethe usability comes from the interface and not from the path. If I wrap the path into the interface then there can be more then one path for content - as much as the same content can be on different urls - otherwise posting a youtube video on my blog will be SEO and usability unfriendly because - well its the same content with two different pathes (one to youtube.com/samecontent and to myblog.com/samecontentwithdifferntnameandpath.)

There simply is no difference between a URL and a Path in my view.

As for the "which taxonomy should be used and which shouldnt" (administration interface problem) I see this more of a general "the drupal interface is about the worst interface for a content management EVER" problem with its endless list of options, where there is no order etc etc etc. But generally I thought that the "root" (as with category.module) taxonomy term would be used - I understand that this might not apply to a "normal" drupal installation - but I think - as an interface designer - that the normal "drupal" taxonomy way is way more frustrating for a user to navigate around then my proposal is. (I think flat structures suck (not always but most of the times) and prefer hirarchical in most cases).

Also I have seen some other discussion about this problem so there must be some kind of demand for it - even if it isn´t seo or considered user unfriendly (which I completely not buy into: see above).

But yeah I understand this won´t ever happen. Too bad that I now have to put multiple times the same content in my site - one more of the many reasons why I won´t recommend drupal to other developers around me - this is silly. Especially in the light that reuse, resample of content is the Web of today and it does not have to be across URLs (just a different path to the same content see above) but also intra url.

People need to start thinking outside the box - this "oh its considered bad practise" does not work on the web - there is a usage scenario for everything where the "this is not good" is just hindering the furthering of the web in general.

greggles’s picture

The place where I read that multiple paths for the same content is a bad idea was in either

# Designing Web Usability: The Practice of Simplicity (1999) (ISBN 1-56205-810-X) or
# Homepage Usability: 50 Websites Deconstructed (2001) (ISBN 0-7357-1102-X) (coauthor: Marie Tahir)
By Jakob Nielsen - http://en.wikipedia.org/wiki/Jakob_Nielsen_(usability_consultant)

If you dislike the way it works, feel free to make a patch that does exactly what you want and lobby other people behind your cause. This isn't an autocracy - if lots of people like the idea then it will of course become part of the module.

falk_g’s picture

I hope I didn´t cause any offense - it was of course not directed at you per se... you are about the only person answering to my quite quirky requests ever ;) thanks for the book recommendations I give them a read but generally my point stands that there is no difference between a URL and a path and both can have the same content with different ways to get there - its the essence of the web these days... RSS by the way is already serving the same content under different pathes on the same site if you want to be nitpicky.

as for the patch.. I looked into the cause already (after making the first post here). I think its not even that hard to implement (another stored variable like the new "lang" one that drupal 6 uses - even an undefined one that could then be used by modules at their will) and would be totally optional thereafter but the changes would have to be made in the path module which is core and which is almost impossible to make any additions as a new drupal user who has no credibility ;) The other change would be made in the category.module which is - it seems - hated by the core developers because it messes with their idea of how taxonomy works and has a not very active maintainer (as you might know ;) and the third change would be made in pathautomodule - here I see the way of least resistance if the others are in place ;) but putting the others in place is like moving a hill pebble by pebble and not really worth my time - another day perhaps. As for the moment I have to use multiple approaches with tons of different content types that have specifically set up pathes and a lot of handcoding on top and a user interface approach of warning the user that he leaves the "secure path" (an internal external link so to say) he is on - it sucks but better then nothing I guess.

thanks for taking the time to answer at all to this!

mor_eli’s picture

Version: 5.x-2.x-dev » 6.x-1.2

Do you mind detailing how you got this done? I'm facing the exact same problem and trying to get an idea on how to do this. Any suggestions are welcome!

Thanks!