Hi,

I have a new site up and running and now need to work on the SEO.

The page_title module has been installed however whilst this allows generic browser page titles to be set ie "page-title | site-name" I need to set a browser page title for each page separately.

For example - if the content page title is "PPC Management" and the site name "MyWebsite.com" this would display "PPC Management | MyWebsite.com" as the default browser page title.

However, I would like the content page title to stay as it is yet define the browser page title to be "Pay Per Click Management & SEO".

Essentially I need the ability to define the content page title and the browser page titles separately.

This has a major impact upon SEO as the content page title is usually defined as h1 and the purpose of each title is very different. I've looked at previous posts however these all refer to using the page_title module.

p.s. the site is live so the titles can be seen at www.artisanmanagement.com

Many thanks in advance ........

Comments

WebNewCastle’s picture

If I remember correctly, the page title module also allows you to override / specify the page title on each node. It may be a setting that you have to check off / activate first in order to do that. If there isn't anything in the main module settings, maybe check under the content type settings.

ARTiSAN-3’s picture

Hi Matt

Thanks for your post however the page_title module only allows you to set the title for each generic node type whereas I need to define each page separately.

The only solution I can think of is to add an additional field for 'title' in the create content section.

I can obviously change the code directly however that somewhat defeats the idea of a CMS package. Other CMS packages I've used have SEO sections which include setting the page title along with the other meta tags such as keywords, description, etc as its all part of the same thing.

WebNewCastle’s picture

Are you sure? You're talking about this module right? http://drupal.org/project/page_title

If so, there should be a Show field checkbox next to each content type in the Page Title settings under Admin >> Content Management

ARTiSAN-3’s picture

Yes its generic and sets the title by content type ie blog, page, story, etc.

It allows the front page to be defined plus a site wide default title however not individual pages.

Individual page titles can be defined within the create content section however this text is also used to define the module/content title.

WebNewCastle’s picture

If we're talking about the same module, then there should be two fields - Page title and Title.

ARTiSAN-3’s picture

I'm sure we're talking about the same module 'Page Title' however there's def only one title within the module.

The content title (heading ?) is defined within the content pages and the page title is defined within this module.

Am I missing something ?

Many Thanks
Chris

WebNewCastle’s picture

You should be able to activate (per content type) so that a page title field appears for every node.

savioret’s picture

You can do it easily by :

  • Defining an only global variable for the content title, and setting it from wherever you want
  • Overriding yourtheme_preprocess_page(&$vars, $hook) in template.php and setting the template variable there from your global one
  • Overriding page.tpl.php copying it to your theme

Instead of a global variable, you can do it the drupal way, same way as definining drupal title:


function drupal_set_content_title($title = NULL) {
  static $content_title;

  if (isset($title)) {
    $content_title = $title;
  }
  return $content_title;
}

and from your yourtheme_preprocess_page implementation...

function yourtheme_preprocess_page(&$vars, $hook) {
  global $theme;

  // ...

  $content_title = drupal_set_content_title();
  if($content_title !== NULL)
  {
    $vars['title'] = $content_title;
  }

  // ....
}

Hope it helps.

ARTiSAN-3’s picture

Thanks for the information.

I found it can be done it via the Page_Title module as mentioned by Matt above. Its not exactly obvious however it does work.

Cheers
Chris