I have a site where there are several domains each with different content:
www.domaina.com www.domainb.com www.domainc.com
I want to make the alias foobar to different paths on each domain
www.domaina.com/foobar => page/100/14 www.domainb.com/foobar => page/136/12 www.domainc.com/foobar => page/96/14
I would like to be able to create the aliases using tokens and pathauto in my own module. I've considered Domain Access, but I'm not sure this allows you to create different aliases per domain.
Can someone please confirm what the best approach would be?
It looks like I can use Domain Path and Domain Access, but looking at the source code of Domain Path, I'd have to add entries for each alias:
$domain = domain_get_domain(); $domain_id = $domain['domain_id']; $record = array( 'domain_id' => $domain_id, 'source' => "node/$node->nid", 'alias' => $path, 'language' => isset($node->language) ? $node->language : LANGUAGE_NONE, 'entity_type' => 'node', 'entity_id' => $node->nid, ); drupal_write_record('domain_path', $record);
This is drupal 6 code, so I don't understand why there is an entity_type and an entity_id. I'm going to be creating aliases to sources that are views with arguments. Does anyone know how I'd create that record?