2

I'm new to Domain Access module. It seems it is built to allow you to run different sites off the same database. I'm looking for something more simple than that.

I want to the subdomain title to be included in the site name. I want a content type to be assigned to different subdomains and for that content to be the only content of it's type visible on the same subdomain.

Aside from that, everything else on the site should remain the same. Theme, users, layout, etc.

How can I best do this with DA module? Is it possible to use the domain as a variable (for use in views, panel's context and a token for the site name)?

1

I did this by installing Domain Access module. When skimming Domain Access module's documentation before, it seemed extremely complicated. However, the documentation is geared towards you learning all about how it works. The actual steps to install are more than a regular module, but not too complicated.

It allows me to restrict content to a specific domain and to have different site names for each domain.

| improve this answer | |
0

Edit: I see the 7.x version of Subdomain does not yet support Content type domains.

If you use Domain Access, you can manually create all the required subdomains and you can define a site name for each (I believe this requires the included submodules Domain Configuration and Domain Settings). You can set a default front page for each domain you create (such as a Views page). If you want to filter by content type, you will have to configure a view for each subdomain. It may be better, however, to use the DA module's model of content affiliation, that is, when you create a node you can assign it to a specific (sub)domain. If you want to restrict on which domains nodes are viewable, you will have to do this anyway, so the differentiation by content types might not be necessary (depending on your needs).

If you do need different content types for each subdomain and you can't trust your users to choose the right domain content affiliation, you can use Domain Content Types to restrict which content type can be used for each domain, e.g. the 'News' content type is configured for use only on the domain news.example.com.


It seems the Subdomain module will do exactly what you want:

Content type subdomains: e.g. "News" content at http://news.example.com

This is also a much more light-weight solution than Domain Access - always a good thing.

| improve this answer | |
  • Do you have experience with this module in this situation? – mpdonadio Jan 7 '12 at 15:27
  • Admittedly, no. But I've used DA and while you can of course build the necessary views to show the right content for each subdomain, DA seems overkill for this use case. – arjan Jan 7 '12 at 16:10
  • I ended up going with Domain Access. There will be a few pieces that could be trickier, but for the site names and content, it worked out with very little config – mtro Jan 7 '12 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.