Page Title Module – Control Meta Titles in Drupal

tutuploadsmedia_1340035249945.png

Page Title is a very simple, yet very important module when it comes to SEO on your Drupal site. This module gives you granular control over your meta titles.

Although Nodewords was the preferred option in Drupal 6, it didn’t make the leap to Drupal 7 became the Meta Tags module in Drupal 7. The Page Title module is one of the options now available for Drupal 7.

The meta title is found in your HTML head code and is surrounded by <title> tags. The meta title appears in the browser bar when people are viewing the page. It also appears on SERPs (Search Engine Result Pages), and a well written title can greatly increase the number of people who click through to your site.

Step 1: Download and install the module and dependency

tutuploadsmedia_1340035249945.png
  • You need two modules to make this work, the Page Title module itself and the Token module.
    • Page Title Module: http://drupal.org/project/page_title
    • Token Module: http://drupal.org/project/token
  • You can access the configuration and the permissions links from the Module page immediately after installation or at any time go to Configuration > Page Titles from the administration menu.

Step 2: Configure the module and set the patterns

tutuploadsmedia_1339965361234.png

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). The Token Scope column lets you know which tokens are available for this field (Global is always available).
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). The Token Scope column lets you know which tokens are available for this field (Global is always available).

  • To place the tokens into the fields, place the cursor into the field you want to edit.
  • Scroll down on the page and you can find the available tokens.

tutuploadsmedia_1339965436682.png
  • Click the triangles next to the names, to expand the choices and drill down to the token you want to use to set the pattern.
  • Click the token link and it will automatically be inserted into the field for you.
  • You can put more than one token into the field.
  • In the image above we are making the title from a combination of the current page title, plus the title of the site.

tutuploadsmedia_1340033864373.png
  • After saving the changes, you can see that the <title> tag on the site has been changed by viewing the source in your browser. In this case it is created from the title of the article and the title of the site (my test site is named Drupal 7).

tag on the site has been changed by viewing the source in your browser. In this case it is created from the title of the article and the title of the site (my test site is named Drupal 7).

tutuploadsmedia_1340033955394.png
 

Author

  • Steve Burge

    Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

0 0 votes
Article Rating
Subscribe
Notify of
4 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Thomas Svenson
Thomas Svenson
11 years ago

Great tutorial, thanks for sharing. Only thing I would like to comment is on:

“Although Nodewords was the preferred option in Drupal 6, it didn’t make the leap to Drupal 7”

It did, but in the form of the “Meta tags” module, which the Nodewords project page also refers too.

One big reason for this was to be able to start fresh and really take advantage of all the new features in Drupal 7 without the need of supporting legacy.

Fashion Belle
Fashion Belle
11 years ago

Most of the Page Title functionality has been merged into Meta Tags now. However, there is one issue that is not resolved, and that is duplicate page titles for Views pagination. Only Page Title can do this. A feature request has been submitted to Meta Tags to try to get this incorporated so that Page Title can be phased out. I think the two modules might conflict now, so you can’t use both.

Fashion Belle
Fashion Belle
11 years ago

My apologies, I learned you can use both Meta Tag and Page Title together. The work on fine-grained title functionality in Meta Taq is going slowly, so the experts with whom I talked recommended using both modules together. Leave the title options blank in Meta Tag to do this, and fill them out in Page Title.

4
0
Would love your thoughts, please comment.x
()
x