Anyone who has been doing Search Engine Optimization (SEO) for a very long knows that what you title your web pages is very important. To get a little technical, since there can be some confusion, when I refer to Page Titles I mean what is between the <title> and </title> tags in the heading portion of a web page. This is the title that shows at the top of your web browser when visiting a page.
In the example above you will notice that the title says: “Module Articles | Run Drupal.” The keen observer will also notice that this is simply one of my tagging terms I use. By default Drupal would normally have simply titled this page “Module | Run Drupal.” Not the end of the world but obviously adding the word articles makes this easier for people to know what this is section is all about. Along with this it also makes my page more search engine friendly if people are searching for something with the word article in it.
This is a very rudimentary example of one of the benefits of the Page Title Module. I will show you how it is done in this Drupal tutorial. Further I will show you how you can override virtually any page title you want. This is very beneficial when you want to have your <h1>Heading</h1> title that shows in the content section of your page different from the Page Title (<title></title>). Ok, on with the tutorial:
The first step is to go download the Page Title module and install it. If you don’t know how to do this please go read my How To Install A Drupal Module Tutorial and then come back. It will make your life a lot easier.
Once its installed you will be able to get to the Page Title Module settings by navigation to the Administration, Content Management, Page Titles menu (www.your-drupal-site/admin/content/page_title).
Once you navigate to this page you should see a screen similar to the one below. Don’t be overwhelmed we will walk through each setting.
Basically this is the catch-all. If none of the other page type settings handle a page it will fall back to this one. The Page Titles module is so considerate and puts in a default for us. This default is the normal way that Drupal handles page titles. How convenient.
Another convenience that Page Title gives you. You can literally make your main homepage be any title that you want now! No more hacking theme files or any other crazy tricks. Say exactly what you want to say.
As viewers register themselves as a user at your site they get a profile page. This can be very basic or quite complex depending on how you set it up. Again you can set up the page titles to be whatever you want – keep in mind that you can use Tokens (discussed below).
Each content type can have its own settings defined. For example maybe you want to append A Story about into the title for all of your stories. You could put this in the pattern text field: A Story About [page-title]. Now when you create a new story and call it something like: How I Found My Lost Keys. The page titles module would automatically make this into: A Story About How I Found My Lost Keys.
Depending on what other modules you have installed and how you have things set up you will see options to setup title patterns for many different things. For example I have a category set up to define keywords for my posts. I changed its pattern to be: [cat] Articles | [site-name]. This is how my Module Articles | Run Drupal happens.
To unleash the true power of the Page Titles module you need to begin to learn how to use tokens effectively. The Tokens Module is used by Page Titles and many other modules in order to allow you to easily substitute things from nodes, categories, your site, etc. They dynamically get replaced by the corresponding value depending on the situation. If you go to the bottom of the Page Titles settings page you will see an expander labeled Available Token List.
Spend time reading through these and discover all the power you have. If you don’t understand what one of them is no problem just use it in a title. Create a dummy page and see what its title becomes.
No matter how effective you are at using Tokens and creating great Title Patterns, there will be times where you simply want to set the page title by hand. You can give yourself this possibility by checking the Show Field check box on the right side of the screen for any content types that you want this ability on.
By doing this you will see an extra field when creating on of the specified types. For example below is a screenshot of what I see when I create a new page. Notice that I have both a Title and Page title field now.
The Title is what will show up in the content of your post (usually in <h1> tags). The page title is what will show up in the <title> tags and the browsers toolbar. Take note that if you leave the Page title blank things will simply fall back to what is setup for that content type. So you only need to use this field when you want to do something out of the ordinary.
Page Titles is a very simple module that handles almost all the unique situations that an SEO expert will want to implement. The interface is very easy once you get used to it and you will find the time you spend learning Tokens to be very valuable as many other Search Engine Optimization modules use these. Good luck as you put all this into practice please feel free to comment below on how things are going.
Comments
It's how you say : basic but
It's how you say : basic but pretty useful ! Thanks for the explanation, one couldn't make it simplier.