/ Published in: PHP

simple preprocess function to alter the site name depending on the section of the site
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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'); } } }
Comments
