0

I am using Drupal 7 for a site and I installed the Domain access module for maintaining the sub-domains. The slideshow block (created using the Views module) should be displayed on the sub-domains front page, but not on the main domain.

I tried the Domain block module, but it would require to manually set the block for each domain.

How can I make the block appear only on the front page of the sub-domains?

2 Answers 2

1

I recommend you to use context module for block displays with the domaincontext module extension.

Domain Context module is an integration module for the Domain Access module and the Context module.

The Domain Access module allows administrators to set specific settings for each of their domains that are using the same code base. The Context module allows you to assign blocks to regions (and more) given certain conditions that can be set in the Context admin. Currently when both modules are installed you have no interface that will allow you to trigger a context on a specific domain. This module adds a domain condition to the context administration so that you can trigger a context on a specific domain.

2
  • The Domaincontext module didn't help me. Even, it gave Domain condition while creating new contexts. Any help other than that.
    – Kiran Tej
    Sep 7, 2014 at 6:46
  • I am planning to write code to disable the slideshow for the main site.
    – Kiran Tej
    Sep 7, 2014 at 7:10
1

I added a view filter based on the domain ID (unique key ID).

These key IDs are nothing but the domain IDs you get while creating new domains. By default,the main domain ID is 1.
In the view, I added the Domain: Key ID filter and made a filter for Domain Key ID ~ 1.

It worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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