Integrated Metatags

Integrated Metatags v1.0 - Documentation

By Craig A. Hancock
http://drupal.org/project/int_meta

This documentation covers Integrated Metatags v1.x, including all dot-releases. You can find a copy of this documentation in the README.txt file included in your download. For copyright and licensing information, please see COPYRIGHT.txt and LICENSE.txt (respectively), which should also have been included in your download.

Revision Information

Section 1. Introduction

This documentation covers the 1.x version of Integrated Metatags.

Integrated Metatags was originally designed as a contrib module for Drupal 6. By request, a back-port for Drupal 5 was created. The Drupal 6 version of this module has an option to display Metatags when nodes are rendered as a teaser, an option missing in the Drupal 5 version. Aside from this one feature difference, the Drupal 5 and Drupal 6 versions are functionally identical.

Future development will continue in a 2.x branch of the Drupal 6 version. Bug fixes will continue to be applied to the 1.x Drupal 5 and Drupal 6 versions, but no further feature development will happen in the 1.x versions. Once Drupal 7 is released, I intend to port the 2.x version, or will only release it for Drupal 7 depending on timing. The 1.x versions of this module may also be ported to Drupal 7 if there is enough demand for it, or if Drupal 7 is released prior to the 2.x version is completed.

Section 1a - How this differs from Nodewords

What's the difference between this module and the Nodewords/Meta tags module? The Nodewords module has a lot of functionality built into it, providing a much broader range of control over Metatags. However, I disliked that it required you to populate a field for your Metatags in each node form. I figured there had to be a better way to dynamically generate the Metatags without having to manually enter them for every node. I then created the Integrated Metatags module, which allows you to configure Metatags at the content-type level. By abstracting the Metatag settings to the content type instead of the node, and by exposing node properties for generating dynamic Metatags, the Integrated Metatags module allows for a broad range of Metatags.

Section 2. Features of the Module

Integrated Metatags allows you to expose content data in META-tags on full-page node views, with Metatag options stored per content type. Node, taxonomy, and user information are all available out of the box, with an optional CCK module that exposes CCK data. Additionally, if the Token module is enabled you can use tokens in your Metatags. Using all of these different sources for data, you can name your Metatags however you would like, and can even combine like-named Metatags into a single comma-separated tag.

NOTE: only the "keywords" and "description" Metatags will have any benefit with today's search engines. This module can be used to dynamically generate these Metatags. Other Metatags will NOT improve your site's Search Engine Optimization (or SEO) with most search engines. However, if you control your own crawler this extra data could be used for things like a faceted search.

Features:

Section 3. Installation and Configuration

This section covers both the installation and configuration of this module. A greater explanation of how the module is used can be found in Section 4, while this section will only cover the available pages and basic options for configuring the module.

Section 3a. Installation

Installation of this module should be just like any other module you would download from the Drupal website. Download the module from http://www.drupal.org/project/int_meta and extract it to your modules directory (e.g. extract to sites/all/modules/int_meta). The following files should be in the directory:

When enabling either of these modules, you can find them under the "Other" grouping on the Module adminstration page. The optional Integrated Metatags - CCK module requires that both the Integrated Metatags and CCK modules are enabled before it can be used.

Section 3b. Configuration

There are three different places that this module is configured. They are:

1) admin/settings/int_meta - Use this page to configure how you want to cap your Metatags. There are options for "description" tags, "keywords" tags, and all other tags. Each has its own fieldset to configure with, and each fieldset has the following options:

NOTE: These settings are site-wide, meaning that all rendered Metatags will respect the settings on this page. It is also worth noting that Metatag capping will happen AFTER HTML tags have been removed and whitespace has been consolidated.

2) admin/content/int_meta - This page lets you configure a single set of Metatags that can be inherited by any of your content types. You don't have to configure this page to use this module, however it simplifies needing to redefine similar Metatags for each content type.

The settings for this page are:

3) The last place can be reached by going to Administer > Content management > Content types, then selecting to edit a content type. Among the local tasks at the top should be a "Metatags" tab. Depending on your version of Drupal, the path will resolve to (replace <type> with a content type):

This page will look very similar to the one found at admin/content/int_meta, with the following addition:

Section 4. Using Integrated Metatags

Building off the configuration settings in Section 3b, this section uses examples to illustrate how to utilize the provided settings. By following the examples, you should be able to customize your own Metatags to meet some basic Search Engine Optimization standards. For the sake of keeping things simple, I'll use the "Page" content type in my examples, unless otherwise stated. However, you should be able to follow the examples with any content type you wish.

Section 4a. Creating and Managing Metatags

This section coming soon.

Section 4b. Using Inherited Metatags

This section coming soon.

Section 4c. Metatag Length Capping

Generally speaking, most search engines only look at the "description" and "keywords" Metatags. Depending on the search engine, they will only utilize these tags up to a certain length. For example, Google will use your "description" Metatag in returned search results up to 150 characters[link]. It is possible that your Metatags will be ignored if they are too long, which is bad for your SEO. As such, the option to cap the length of Metatags has been included as a configuration option.

When you visit Administer > Site configuration > Integrated Metatags, you are able to create a word or character cap for the "description" Metatag, "keywords" Metatag, and all other Metatags. These settings are applied to Metatags for all content types.

Example: Limiting the length of your "description" Metatags to 150 characters.

Visit Adminster > Site configuration > Integrated Metatags and locate the "Description Metatag" fieldset (expand it if needed). Enter 150 into the text field, and select the "characters" radio button. Click the "Save" button at the bottom of the form.

Example: Limiting the length of your "keywords" Metatags to 50 words.

Visit Adminster > Site configuration > Integrated Metatags and locate the "Keywords Metatag" fieldset (expand it if needed). Enter 50 into the text field, and select the "words" radio button. Click the "Save" button at the bottom of the form. Note that this will limit the number of words, and not the number of terms used.

Section 4d. Using the Token Module

To use tokens with this module, you need to first make sure the Token module is enabled through your Administer > Site building > Modules page. Once enabled, the content-type "Metatags" pages and the Inherited Metatags page will all have additional wording stating where you can use tokens. It should be noted that tokens can only be used in the "Manual/Static Metatag entry" field, and not in the Dynamic Metatags section. A token can be used as both the value of a static Metatag, as well as the name. Other token-related modules that expose extra node-related tokes will also be usable.

Example: Creating an "nid" Metatag.

Visit the Integrated Metatags page for a content type (e.g. Administer > Content management > Content types > Page > Metatags). Start editing the "Manual/Static Metatag entry" field, and enter the following:

nid|[nid]

Remeber that when defining a static Metatag, the form is <name>|<value>. So, the name of the Metatag will be "nid" and the value will result in the nid of the viewed node. Save the form, and the nid Metatag will start displaying for your content type.

Example: Using tokens to create a dynamicly-named Metatag.

Just as in the last example, go to your Integrated Metatags page for a content type (e.g. Administer > Content management > Content types > Page > Metatags). Start editing the "Manual/Static Metatag entry" field, and enter the following:

[user-name]|[title]

Just as previously outlined, the form here is <name>|<value> for the Metatag. So, if the username for a node is "drupal4life", and the title is "Attending DrupalCon", after you save the page the following Metatag will appear as appropriate:

<meta name="drupal4life" content="Attending DrupalCon" />

Section 5. Extending Integrated Metatags

This section coming soon.

Section 6. How Integrated Metatags Works

This section coming soon.

Section 7. Credits

This module was created and is maintained by Craig A. Hancock (fractile81 on drupal.org).

I'd like to thank the following individuals for their help in making this module become what it has:

Special thanks to Drupal for both a great application and a community website that allows for the online distribution and maintenance of this module.