Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all,
I would like to do the following. I'm not sure if its possible with this module.
My client has a Drupal site. Say www.example.com.
They would like uk.example.com to have the UK logo at the top of the page and us.example.com to have the USA logo at the top etc... For the rest they'd like the site to be exactly the same. Would this be possible with the subdomain module?
Thanks!!
Comments
Comment #1
colemanw CreditAttribution: colemanw commentedI assume you're using version 1.x. In that case, no problemo.
The cleanest way would be to drop this code into your hook_preprocess_page function in your theme's template.php file:
Now you've got your subdomain as a body class, and you can theme the logo, or anything else your heart desires, with css.
Of course, you could also just override the $logo variable here and be done with it, by adding this line to the end:
Then just make a folder of logos in that directory with the correct names (in this example it would be /sites/default/files/logos/uk-logo.png)
Good luck :)
Comment #2
ratinakage CreditAttribution: ratinakage commentedThanks!
Comment #3
colemanw CreditAttribution: colemanw commentedYou're welcome.
For the second piece, about everything else being exactly the same, if you are refering to content, you can do this simply by giving one node multiple aliases.
So if you make node/1 your front page, you could also give it the aliases ~uk and ~au and then it will be the front page of uk.example.com and au.example.com as well.
Good luck.