Synopsis
The Domain Theme Switch module has the setting to set the different theme against each domain.
Module Dependencies
Domain
How to use "Domain Theme switch"
- Config path is "Configuration > Domain theme switch"
- Select the theme against the domain name and save the configuration. clear the cache.
The "Domain Theme Switch" module is currently used in the following domain.
https://www.familyeducation.com/
https://www.teachervision.com/
git clone --branch 8.x-1.x-dev https://git.drupal.org/sandbox/aloknarwaria/2691703.git domain_theme_switch
cd domain_theme_switch
Link to sandbox project https://www.drupal.org/sandbox/aloknarwaria/2691703
Manual Review done for other Projects:
https://www.drupal.org/node/2851052#comment-11928535
https://www.drupal.org/node/2839903#comment-11930427
https://www.drupal.org/node/2847279#comment-11935291
https://www.drupal.org/node/2847141#comment-11930962
https://www.drupal.org/node/2850757#comment-11930570
https://www.drupal.org/node/2851740#comment-11933787
https://www.drupal.org/node/2828016#comment-11782701
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | domain_theme_switch.patch | 1.23 KB | harsh.behl |
| #12 | 2.png | 46.46 KB | soaratul |
| #12 | 1.png | 59.62 KB | soaratul |
| domain_theme_switch_configuration.png | 47.71 KB | aloknarwaria |
Comments
Comment #2
PA robot commentedProject 1: https://www.drupal.org/node/2826944
Project 2: https://www.drupal.org/node/2826872
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #4
aloknarwaria commentedComment #5
PA robot commentedFixed the git clone URL in the issue summary for non-maintainer users.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #6
sarthak drupal commentedWorks for me great job :)
Please add more steps in README file so that easy to setup the domains and test the themes against the individual domain.
Comment #7
sarthak drupal commentedComment #8
ashish-deynap commentedComment #9
soaratul commentedGot following error after enable the module.
Fatal error: Call to a member function id() on null in modules/contrib/domain_theme_switch/src/Theme/ThemeSwitchNegotiator.php on line 42
Comment #10
aloknarwaria commentedComment #11
aloknarwaria commented@soaratul
Reported issue regard Fatal error is fixed please review again.
Comment #12
soaratul commentedGreat @aloknarwaria,
Now I can access pages, without interruption.
Next I go through the process to setup theme by domain and will suggest following to improve user experience.
1. Please change path for "admin/config/domain_theme_switch/configuration" to "admin/config/domain/theme", and also add this menu as tab beside "Domain settings"(Please see attached screen short 1.png), and correct breadcrumb accordingly, I would suggest to have breadcrumb as "Home -> Administration -> Configuration -> Domains -> Theme".
2. Add a description on domain theme page so that user can know more about.(Please see attached screen short 2.png)
3. I would suggest to change message, that is displayed if no domain added. That is change from "Unable to find the domain record please click here to create the domain first." to something like "To add theme at-least one domain record is required, click here tot add domain."
Comment #13
aloknarwaria commentedThanks @soaratu suggested changes are done please review again.
Comment #14
soaratul commentedAwesome @aloknarwaria,
I go further and found following, please have a look into these.
1. Routing name domain_theme_switch.domain_theme_switch_config_form can be changed to domain_theme_switch.settings?
2. Configure link is missing in .info.yml, it generate a link on module list page interface.
3. There should be at-least one permission, that will help to people to assign to any role.
4. Use single quote instead double e.g change t("Select Theme for @domain_name",array('@domain_name'=>$value)) to t('Select Theme for @domain_name', array('@domain_name' => $value)).
5. One line should have a maximum of 80 character.
Comment #15
soaratul commentedComment #16
aloknarwaria commentedDear @soaratu suggested changes are fixed. Thanks for your valuable comments and efforts.
Comment #17
aloknarwaria commentedComment #18
harsh.behl commentedHi,
@aloknarawaria please the patch for some minor tweeks.
Comment #19
aloknarwaria commentedHi @pen thanks for reviewing my module very closely and appreciate for your patch.
Comment #20
aloknarwaria commentedComment #21
aloknarwaria commentedComment #22
aloknarwaria commentedComment #23
aloknarwaria commentedComment #24
aloknarwaria commentedComment #25
aloknarwaria commentedComment #26
PA robot commentedFixed the git clone URL in the issue summary for non-maintainer users.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #27
aloknarwaria commentedI tested my module on https://pareview.sh please find the output below:
Review of the 8.x-1.x branch (commit 22ef6e7):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
Comment #28
sarthak drupal commentedHi @alok
This module works for me as per my requirements.
I didnt find any warning or errors.
Code is written with Drupal 8 standards.
Great work.
Thanks
Comment #29
aloknarwaria commentedComment #30
aloknarwaria commentedComment #31
yogeshmpawar@aloknarwaria - you can not change to status to "Fixed" of your project. one of the "Project Application Git Review Administrator" have to do this. so please don't change your project status to "Fixed".
please see the link for Review Process.
Comment #32
aloknarwaria commentedHi Yogesh Pawar,
Thanks for your prompt response, I will take care of this.
Comment #33
b n pandey commentedHi @alok
This module works for me. I review this module manually and did not find any error.
Finally I tested this module on pareview.sh and did not find any error or warning.
https://pareview.sh/node/355
Thanks
Comment #34
aloknarwaria commentedHi B N Pandey,
Thanks for reviewing my piece of code and your kind feedback.
Comment #35
aloknarwaria commentedComment #36
aloknarwaria commentedComment #37
aloknarwaria commentedComment #38
aloknarwaria commentedComment #39
aloknarwaria commentedComment #40
aloknarwaria commentedComment #41
aloknarwaria commentedComment #42
visabhishek commentedReview of the 8.x-1.x branch (commit 22ef6e7):
No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
Otherwise all looks good for me.
Thanks for your contribution, aloknarwaria!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #43
visabhishek commentedAssigning Credits.