Documention addon: setting global config vars
levavie - February 25, 2007 - 08:32
| Project: | Multiple Domains |
| Version: | 5.x-1.x-dev |
| Component: | documentation |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Here is an example of how to set global configuration variables (e.g. title, homepage URL) for the subdomain.
<?php
global $conf;
$conf['site_name']='The title of this domain';
$conf['site_frontpage']='node/244'; // The URL of the page to displayed on the front page of the domain.
?>The code should go to the 'Initialization code' field of the domain.
My sample multidomain

#1
Continued:
My sample multidomain site is http://www.levavie.com.
Note: To fetch the site front page URL in the theme:
<?phpglobal $conf;
print '<h1><a href="'. check_url($conf['site_frontpage']) .'" title="'. $site_title .'">';
?>
(The example is taken from the garland theme.
#2
1. No patch is attached
2. It goes under Documentation.