Hi all.
I have done a site that changes his layout and contents based on the domain but using the same drupal core and installation.
for example i have:
www.siteone.com
www.sitetwo.com
www.sitethree.com
where one, two, three are the terms of a special vocabulary, in order to select the right contents for the right domain.

Now I'd like to make a block view listing all the nodes inserted in all the sites publishing the term and the title of the node, linked to the right content of course.
So I'm experiencing two matters:

1. The title is linked to the right contents, but still in the domain where it is displayed and not the one referenced by the term.
Example:
I am in www.siteone.com and i click on the node "ContentA" (which has "two" as leading term): it gets me on http://www.siteone.com/node/ContentA but i want to go on http://www.sitetwo.com/node/Content
What I have to do for changing the domain of the link in that view?

2. I'd like that the term listed in the block could link to the right domain.
for example: term "one" should link to http://www.siteone.com
Do you have any idea to do that?

Thank you in advance and sorry for my english.

Comments

dean_l’s picture

Hi Cosmy

I don't have solution for you as I am currently trying to fix very similar issue. If you find solution, please let me know. Of course I will share my solution with you too.

These are the pages that inspired my setup
http://drupal.org/node/686538
http://drupal.org/project/domain
http://www.trellon.com/content/blog/sharing-content-domain-access

Regards issue 2, terms and links, I guess you could design custom module that will wrap terms with correct url. I will look for more details and let you know if I find something.

good luck.

gbrands’s picture

Have you taken a look at hook_link()?

It will allow you to add links to the bottom of the node content based on the node. So I could see something like this possibly working:

function hook_link($type, $object, $teaser = FALSE) {
  $links = array();
  
  // Grab the current taxonomy from the node and iterate over each
  foreach($object->taxonomy as $term){
      // Special logic for determining link path here
      // And then add to $links array (see examples from link above)
  }
  
  return $links;
}

Hope this helps!