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
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

levavie - February 25, 2007 - 08:35
Title:Readme addon: setting global config vars» Documention addon: setting global config vars

Continued:

My sample multidomain site is http://www.levavie.com.

Note: To fetch the site front page URL in the theme:

<?php
           
global $conf;
            print
'<h1><a href="'. check_url($conf['site_frontpage']) .'" title="'. $site_title .'">';
?>

(The example is taken from the garland theme.

#2

wayland76 - January 18, 2008 - 00:16
Component:interface» documentation
Status:reviewed & tested by the community» active

1. No patch is attached
2. It goes under Documentation.

 
 

Drupal is a registered trademark of Dries Buytaert.