Remove your site titles from content pages in Drupal
In Drupal (considering v5.x here), the content page titles i.e. the text which is generated and put between <TITLE> HTML tag comes like this -
Content-Name | Site Name
Right ?
This doesn't look nice and it is not possible to remove this by editing a theme's file.
So here's a simple code change about how to remove this title internally so that whenever it is generated, it gets generated as
Content-Name
We're considering the default template engine - PHPTemplate which comes with Drupal.
You need to edit the file called phptemplate.engine file in /themes/engines/phptemplate directory.
Open the file your favourite editor.
Jump to Line 185 (As of Drupal 5.x)
$head_title = array(strip_tags(drupal_get_title()), variable_get('site_name', 'Drupal'));
Change the above line so that it looks like this -
$head_title = array(strip_tags(drupal_get_title()));
Save the file.
And copy this new file to /themes/engines/phptemplate/phptemplate.engine while backing up the older file.
And voila! you are done!












Comments
Good finding!
Post new comment