There is data available, but not prepared for you.
Do this in template.php:
global $_domain;
This will hand you an array of information about the current domain. So then you do something like:
function template_preprocess_page($vars) {
global $_domain;
$vars['domain_name'] = check_plain($_domain['sitename']);
}
This will hand you a $domain_name variable for use in the template.
You can also use hook_domainconf() to create variables per-domain that are accessible through variable_get(). And you can use domain_domains() to get information about all domains.
I modified to suite the needs of my theme and added to the code above, (based on Step 1 of this post) to clean up the output to use as a CSS class in page.tpl:
Comments
Yes, but not processed
There is data available, but not prepared for you.
Do this in template.php:
This will hand you an array of information about the current domain. So then you do something like:
This will hand you a $domain_name variable for use in the template.
You can also use hook_domainconf() to create variables per-domain that are accessible through variable_get(). And you can use domain_domains() to get information about all domains.
Thank you!
Exactly what I was looking for. Works like a charm. Thank you very much!
Modified...
For anyone who is interested...
I modified to suite the needs of my theme and added to the code above, (based on Step 1 of this post) to clean up the output to use as a CSS class in page.tpl:
$domain_class can now be used to print a class, based on the domain, in page.tpl.
Hope this helps someone.
Thanks again agentrickard This has really been helpful.