Index: page_title.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/page_title/page_title.module,v retrieving revision 1.2 diff -u -r1.2 page_title.module --- page_title.module 29 Nov 2006 23:01:04 -0000 1.2 +++ page_title.module 2 Mar 2007 17:52:34 -0000 @@ -23,7 +23,7 @@
  1. page title | site name
  2. site name | site slogan

#1 is the common case where the visitor is viewing a specific page whereas #2 is used at least for the default front page (node).

-

The page_title.module lets you change these defaults in two ways. First, you can adjust the templates below using the placeholders given. This will change the way the default page titles are created. Second, on every node creation form, you can have the option of specifying a title that is different than the title of the node. If a value is provided, this will be used to generate the @page_title placeholder. If left blank, @page_title will be the node's title, as is now the case.

"); +

The page_title.module lets you change these defaults in two ways. First, you can adjust the templates below using the placeholders given. This will change the way the default page titles are created. Second, on every node creation form, you can have the option of specifying a title that is different than the title of the node. If a value is provided, this will be used to generate the !page_title placeholder. If left blank, !page_title will be the node's title, as is now the case.

"); break; } return $output; @@ -62,16 +62,16 @@ $form['page_title']['page_title_individual'] = array( '#type' => 'textfield', '#title' => t('Pattern for individual pages'), - '#default_value' => variable_get('page_title_individual', '@page_title | @site_name'), + '#default_value' => variable_get('page_title_individual', '!page_title | !site_name'), '#maxlength' => 128, - '#description' => t('Available placeholders: @page_title, @site_name, @site_slogan.'), + '#description' => t('Available placeholders: !page_title, !site_name, !site_slogan.'), ); $form['page_title']['page_title_front'] = array( '#type' => 'textfield', '#title' => t('Pattern for front page'), - '#default_value' => variable_get('page_title_front', '@site_name | @site_slogan'), + '#default_value' => variable_get('page_title_front', '!site_name | !site_slogan'), '#maxlength' => 128, - '#description' => t('Available placeholders: @site_name, @site_slogan.'), + '#description' => t('Available placeholders: !site_name, !site_slogan.'), ); return system_settings_form($form); } @@ -148,8 +148,8 @@ * the page hook of function _phptemplate_variables in template.php. */ function page_title_page_get_title() { - $page_title_individual = variable_get('page_title_individual', '@page_title | @site_name'); - $page_title_front = variable_get('page_title_front', '@site_name | @site_slogan'); + $page_title_individual = variable_get('page_title_individual', '!page_title | !site_name'); + $page_title_front = variable_get('page_title_front', '!site_name | !site_slogan'); // this is the normal title. For node pages it is $node->title $drupal_title = drupal_get_title(); @@ -161,10 +161,10 @@ $site_slogan = variable_get('site_slogan', ''); if ($drupal_title) { - $title = t($page_title_individual, array('@page_title' => $page_title, '@site_name' => $site_name, '@site_slogan' => $site_slogan)); + $title = t($page_title_individual, array('!page_title' => $page_title, '!site_name' => $site_name, '!site_slogan' => $site_slogan)); } else { - $title = t($page_title_front, array('@site_name' => $site_name, '@site_slogan' => $site_slogan)); + $title = t($page_title_front, array('!site_name' => $site_name, '!site_slogan' => $site_slogan)); } return $title; }