$form['pattern']['page_title_default']=array('#type'=>'textfield','#default_value'=>variable_get('page_title_default','[page-title] | [site-name]'),'#size'=>30,'#maxlength'=>256,'#description'=>t('This is the pattern used in a situation where a pattern is not defined specifically for a content type below.'),'#required'=>TRUE,);
$form['pattern']['page_title_front']=array('#type'=>'textfield','#default_value'=>variable_get('page_title_front','[site-name] | [site-slogan]'),'#size'=>30,'#maxlength'=>256,'#description'=>t('This is the frontpage pattern.'),);
//Definate the patterns per-node-type
// Define a default looking 'form element' for setting.
$pattern_form_element=array(
'#type'=>'textfield',
'#size'=>30,
'#maxlength'=>256,
);
// Set the theme callback for the patterns section
$form['title'][$key]=array('#type'=>'markup','#value'=>t('Pattern for %type',array('%type'=>$type->name)),);
$form['pattern'][$key]=array('#type'=>'textfield','#default_value'=>variable_get($key,''),'#size'=>30,'#maxlength'=>256,'#description'=>t('If left blank, will inherit from default settings.'),);
// Pattern entry
$form['patterns']['pattern'][$key]=array(
'#title'=>t('Content Type - %type',array('%type'=>$type->name)),
$output='<p>'.t('Provides control over the <title> element on a page using token patterns and an optional textfield to override the node title.').'</p>';
$output.='<p>'.t('Below are all the tokens you can use with <strong><em>Page Title</em></strong>:').'</p>';
$output.=theme('token_help');
break;
case'admin/content/page_title':
case'admin/content/page_title':
$output=t("<p>Drupal's default page title follows one of two patterns:</p>
$output='<p>'.t('Page Title provides control over the <title> element on a page using token patterns and an optional textfield to override the title of the item (be it a node, term, user or other). You can configure these settings below. Please click on the <strong><em>more help…</em></strong> link below if you need further assistance.').'</p>';
<p>The <strong>Page Title</strong> module lets you change these defaults in two ways. First, you can adjust the patterns below using the placeholders given. This will change the way the default page titles are created. Second, on every content 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 <code>[page-title]</code> placeholder. If left blank, <code>[page-title]</code> will inherit the node's title.</p>
<p><code>[page-title]</code> will default to the value returned from <code>drupal_get_title</code> if there is no overriden page title.</p>");
break;
break;
case'admin/content/page_title/types':
case'admin/help#page_title':
$output='<p>'.t('To display a <em>Page Title</em> field on a node (just below the <em>Title</em> field), you will need to enable it for the appropriate content types below.').'</p>';
$output='<p>'.t('Drupal\'s default page title follows one of two patterns:').'</p>';
$output.='<p>'.t('The <strong>Page Title</strong> module lets you change these defaults in two ways. First, you can adjust the patterns below using the placeholders given. This will change the way the default page titles are created. Second, on enabled forms (curently node, term & user editing forms) you have the option of specifying a title that is different to the title of the item. This field only appears if the <em>Show Field</em> box is checked for the item. If a value is provided it will be used to generate the <samp>[page-title]</samp> placeholder however if it is left blank the <samp>[page-title]</samp> token will inherit the item\'s own title.').'</p>';
$output.='<p>'.t('The <samp>[page-title]</samp> token will default to the value returned from <samp>drupal_get_title</samp> if there is no value specified or no available page title field.').'</p>';
$output.='<p>'.t('Certain types of page title pattern have access to special tokens which others do not, depending on their <em>scope</em>. All patterns have access to the <strong>Global</strong> scope. Content type patterns have access to the <strong>Node</strong> tokens, vocabulary patterns have access to the <strong>Taxonomy</strong> tokens and finally the user patterns have access to the <strong>User</strong> tokens.').'</p>';
// If the node has a custom page title and the node type is configured to have a custom page title (ie, it's not a leftover from a previous setting), then use it.