Return to Snippet

Revision: 66798
at July 4, 2014 07:05 by emijayne


Initial Code
function YOURTHEME_preprocess_page(&$variables, $hook) {
  if (theme_get_setting('toggle_name')) {
    $path = drupal_get_path_alias();
    if (drupal_match_path($path, 'one*')) {
      $variables['site_name'] = filter_xss_admin('Site Name One');
    } else if (drupal_match_path($path, 'two*')) {
      $variables['site_name'] = filter_xss_admin('Site Name Two');
    } else if (drupal_match_path($path, 'three*')) {
      $variables['site_name'] = filter_xss_admin('Site Name Three');
    }
  }
}

Initial URL

                                

Initial Description
simple preprocess function to alter the site name depending on the section of the site

Initial Title
For Changing Drupal Site Name on URL Alias change

Initial Tags
drupal

Initial Language
PHP