Is is any available solution for this request?
All I want to do is
1. when creating a new node -> an alias will be auto generated based on node title
2. assuming I have 2 domains: t1.domain.com and t2.domain.com
-> when adding a new page "about us" from "t1" => t1.domain.com/about-us
-> when adding a new page "about us" from "t2" => t2.domain.com/about-us

So far this happens only partially, because "t2.domain.com/about-us" display the content from "t1.domain.com/about-us"

Please advise.

Thanks,
Alex

CommentFileSizeAuthor
#1 url_alias.txt2.23 KBalexrose
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexrose’s picture

FileSize
2.23 KB

Not quite sure this is the best approach, but for the moment it works for me.
> Modules required and enabled: domain access, domain path(beta3), pathauto & pathologic
> Custom module inspired by: http://drupal.org/node/1412938#comment-5736024 - and modified for my needs
> pattern set as "~[current-domain:name]/[node:title]" for a specific content type; in my case: "section_page"

Short description on how module works
1. get current sub domain_id(in module I'm using a custom function defined in another module, taht return just the domain id based on URL)
2. this modules runs just for for section pages
3. check if we are using path-auto and domain_path
4. get path data
5. skip processing if "automatic alias" is not checked - and remove old value
6. get pattern for this node_type
7. normally, we added in settings "~[current-domain:name]"; now we remove it in order to generate the new URL
8. if no pattern is defined, exit
9. replace tokens in the pattern.
10. clean our generated alias
11. Allow other modules to alter the alias.
12. update alias

I'm pretty sure it can be improved. Any suggestions?

Thanks,
Alex

grndlvl’s picture

Title: Same alias for different nodes » Automatically create same alias for different nodes
Status: Active » Closed (duplicate)

You may manually set the paths the same for the different domains.

This seems to be related to the request to add pathauto support over @ #1412938: Allow domain path-auto support.

Would you mind terribly much to make a patch and submit it there?

Also, I am marking this as a dupe. If this is a different issue please feel free to re-open and let me know what I am missing.

Thanks,

Jonathan