Active
Project:
Subdomain
Version:
6.x-2.0-beta1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2010 at 20:51 UTC
Updated:
25 Dec 2010 at 03:10 UTC
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 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 commentedThanks!
Comment #3
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.