0
votes

I want to configure a Drupal 7 site using a domain and two subdomains with a single database.

domain.com
sub1.domain.com
sub2.domain.com

I am using Domain Access module for sharing content on these subdomains. I want to share some content and to be able to modify some content on each subdomain. The modified content must be viewed only on its subdomain (for example, a different image should appear on each subdomain).

The question is: How can I share content between subdomains and also differentiate some content?

I tried different approaches, I modified the user's permissions and it is still not solving my problem.

  • I published a Basic Page on a subdomain and I can access this page from every subdomain, even if I unchecked the option "Send to all affiliates"
  • If I change the content from a page published on sub1.domain.com, that content appears modified everywhere
  • If I create a user or admin for a subdomain, he is able to login everywhere and I do not want that
1

1 Answers

0
votes

Since you already can publishing in all domains and those changes are visible in all domains, I guess that you have the domains already well configured. This is, all domains pointing to the same Drupal project and using the same database.

So, you have three different questions:

  1. DIFFERENTIATE THE CONTENT FROM EACH DOMAIN: Assuming that you have the domains well configured, and the domain access module is installed correctly, you can publish to a specific domain by selecting which domain to publish the Basic Page, a domain access option now available. (Be sure to test that with an user without permissions to see content from all domain - like the administrator).

  2. CHANGE CONTENT FROM A DOMAIN AND AFFECT ONLY THAT DOMAIN: If the content was published only to a specific Domain it should change only on that specific domain. The trick here is to have a different Theme for each Domain and make the change on the Theme corresponding to the subdomain you want to change.

  3. USERS CAN ACCESS ANY SUBDOMAIN: To control this you have to assign a domain to each user, go to admin/user and there under the AFFILIATE EDITOR OPTIONS tab, you can assign domains to users. (user's registered before the Domain Access module was installed doesn't have an associated domain).