Currently, the 'pattern' settings is domain sensitive, but only one pattern url alias can exist.

Is this possible for auto generating different url alias for different domains?

CommentFileSizeAuthor
#4 1310628-domain-pathauto.patch1.91 KBagentrickard
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

The pattern setting is only domain sensitive if using Domain Settings module.

With that module, auto-generating a path per domain is possible, yes.

rogical’s picture

The pattern settings is do domain sensitive, but when generate path alias, it's not.
The alias seems not domain sensitive yet, only language sensitive.

agentrickard’s picture

Status: Active » Postponed

Two issues you would have to overcome here:

1) pathauto_create_alias does not allow for dynamic changes to the $pattern variable, which we would need to perform this calculation. (hook_pathauto_alias_alter() does not provide enough context for this action.)

2) A mechanism for declaring that one wanted to generate a path alias for new nodes would have to be added to the interface.

I am not interested in working around either problem at the moment. This module was never intended to mass-produce alternate aliases. Setting a unique alias per domain should be a very rare case.

If someone wants to work on the two problems above, patches are welcome.

agentrickard’s picture

If anyone cares, here's half a patch that illustrates the problems above.

Ddroid_za’s picture

Not sure if this will help anyone, had a similar request, maybe not applicable to everyone's use case. By using the panels module I was able to get different content on the same url alias. So /about-foo had different content on domain 1 and domain 2.

Thanks for all the hard work on this!