I wan to change the HTML page title: It is displayed as "pagename | sitename"; I want to change it to "sitename - pagename."
How can I do this?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this community<?php $Title = explode('|',$head_title);
echo $Title[1]." - ".$Title[0];
?>
Add this in the html.tp.php file, inside the <title>
tag.
I would have used existing $head_title_array
variable like this:
<title><?php print $head_title_array['name'] . ' - ' . $head_title_array['title']; ?></title>
Reference: html.tpl.php
You can also do this with the Metatag module.
You can use Page Title module. After installing it, you can access the configuration page of the module by navigating to: