Hello,

On my site I want create a specific case for the path aliases of the users. Users can to be attached to several groups (group A, group B, group C...). By default, i have created an path url with the default group of the user :
[group-default-name]/[user-name]-[user-uid]

If I navigate in the default group of the user (e.g. group A), and in the page that list all the users of the group, it's ok. The url to access to the profile is: group-a/user-name-1.

Now, if I navigate in a second group (group B) and if the user belongs to the second group, the user keep the path alias of his default group: group-a/user-name-1.

In the navigation, we "go out" of the second group (group B) if we click on link to access to the user profile. It's a bad thing. I want to stay in the pages of this second group and then create a link to the user with the "group B".

Can we create a link (and then a second path alias) to access to the user profile, e.g.:
case 1 > group-a/user-name-1 > user/1
case 2 > group-b/user-name-1 > user/1
The two path aliases redirects to the same profile.

Is there any solution for this ?
I have tried the subpathauto module but it's working with arguments positionned after user/%.

Thanks for your help.

Comments

kumkum29 created an issue.

aniket.mohite88’s picture

Hi,

I am not sure, but I think its impossible for an entity to have 2 different url aliases.
Every entity (user, nodes, taxonomy terms) have 1 unique drupal path (user/1, node/22, tid/4) & then the aliases you provide using path auto. The url generated by path-auto is good for SEO as well.

Anyways, take a look at this. This might help you. - https://www.drupal.org/node/1516444

Also, the solution provided here on this page, might help you
https://www.drupal.org/node/457842#comment-1822544

Do check it out.