The following script was posted by someone else in the middle of 2006 and it displays the mission on every page. Other users replied that it worked well for them. I can't get it to work - maybe becasue my version is 5.1?

Any help would be greatly appreciated!

************ from old post **************************
----------------------------------------------------------------------------------------

$mission = theme_get_setting('mission', false); 
if ($mission != ""): 
print $mission;

endif;
-----------------------------------------------------------------------------------------
function theme_get_setting($setting_name, $refresh = FALSE) retrieves setting for actual theme :-)

Comments

quickshare’s picture

You could use the variable_get function:

/**
 * Return a persistent variable.
 *
 * @param $name
 *   The name of the variable to return.
 * @param $default
 *   The default value to use if this variable has never been set.
 * @return
 *   The value of the variable.
 */
function variable_get($name, $default) {
  global $conf;

  return isset($conf[$name]) ? $conf[$name] : $default;
}

Something like this:

print variable_get('site_mission', 'This is just a default text');
sammy-node’s picture

For PHP newbies - you only need to insert this little piece of code into the template;

print variable_get('site_mission', 'This is just a default text');

- the bigger bit at the start of quickshare's post is already defined in Drupal.