Dynamic site title based on role and/or content type I need to dynamically change the Drupal site title to match the role the current use has, or as an alternative option I need to be able to change it based on the content type that is being viewed (on my installation, each role has it's own content).
How can i do that? I'm using Drupal 6
As much as I know the site name is being output with $site_name in a basic Drupal 6 page.tpl.php file and is also part of the $head_title variable. To change them dynamically you could use template_preprocess_page() in your template.php file. Assuming you want to change one or both of those variables based on the user role you could use the following example:

function mytheme_preprocess_page(&amp;$variables) {
  global $user;
  if (in_array('administrator', $user-&gt;roles)) {
    $head_title = explode(' | ', $variables['head_title']);
    $head_title[1] = 'Title for admin';
    $variables['head_title'] = implode(' | ', $head_title);
    $variables['site_name'] = 'Site name for admin';
  }
}


Both the head title and site name variables are modified for the 'administrator' role in this case. It should be relatively simple to make this work for all roles the way you want if writing some custom code is not an issue.