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:
- COPYRIGHT.txt - Contains the copyright information for this module.
- int_meta.info - The Drupal information file for Integrated Metatags.
- int_meta.install - The Drupal installation file for Integrated Metatags.
- int_meta.module - The Drupal module file for Integrated Metatags.
- int_meta_cck.info - Information file for the optional CCK integration.
- int_meta_cck.module - Module file for the optional CCK integration.
- LICENSE.txt - Licensing information for this module.
- README.txt - Documentation for this module.
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:
- Cap on words or characters: This radio option lets you select to cap Metatags on either Words or Characters.
- Enter number to cap at: If left blank (or 0), no capping will happen for the associated Metatag(s). Any value greater than zero will make sure the associated Metatag(s) are capped to the specified length based on the "words or characters" selection.
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:
- Enabled: Enable (checked) or disable (unchecked) the availability of inherited Metatags. If disabled, none of the settings for this page will be used.
- Show empty: Sometimes your Metatags might not have data to display. If unchecked, Metatags without data will not be displayed. When checked, a single empty Metatag will be created to represent each without data to display.
- Show with teasers (Drupal 6): By default, Metatags will only be displayed when you visit a node's page. In Drupal 6, enabling this option will also show a node's Metatags when it is rendered as a teaser. This allows for Metatags to be found on listings such as /blog and Views. To see how to do this in Drupal 5, see Section 5c.
- Manual/Static Metatag Entry: If you have some static Metatags you want to define, enter them here in a <name>|<content> fashion, one per line. If you have the Tokens module enabled, you may use tokens in this field. When tokens are available, the description for this field will change to indicate such, and a collapsed fieldset called "Available Tokens" can be expanded to see what tokens are available for use. See Section 4d for more information on using tokens.
- Dynamic Metatags: This is where you define Metatags that come from a dynamic data source, such as a node's title or associated taxonomy terms. When you first start to configure this page, you will see a single row that beings with the "Add" button. You must click the "Add" button for any new dynamic Metatags to be added (simply saving the page will not work). The labeled columns are:
- Enabled: Whether a Metatag is enabled (checked) or not (unchecked). When a Metatag is added, this field will default to checked. Because of this, the row for adding a new dynamic Metatag (which will always be the last row) will always have the "Add" button in this column.
- Combine: When checked, all like-named Metatags that also have the combine option checked will combine into a single, comma-separated list of data.
- Delete: If checked, the next time the form is saved the associated dynamic Metatag will be deleted.
- Data: When creating a new dynamic Metatag, you must select from the dropdown list what you want the data source to be. Once added, you cannot change the data source of a dynamic Metatag. By default, the following types of data sources are available:
- node.(*): Values from the node's object.
- term.*.(*): Values from all of the taxonomy terms of the node.
- term.<vid>.(*): Values for taxonomy terms that belong to the <vid> vocabulary that are associated with the node.
- user.(*): Extra user information about the author of the node.
- Name: What you want to call your dynamic Metatag. Note that this field only needs to be unique per data source (e.g. you can have any number of dynamic Metatags named "keywords", but each of them must have a different data source).
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):
- Drupal 5: admin/content/types/<type>/metatags
- Drupal 6: admin/content/node-type/<type>/metatags
This page will look very similar to the one found at admin/content/int_meta, with the following addition:
- Inherit Metatags: To use the inherited Metatags configured on the admin/content/int_meta page, you have to have this option selected. Once clicked, resave your form and a list of inherited Metatags will be included in the "Dynamic Metatags" fieldset. NOTE that the inherited Metatags configuration page must be enabled for this option to have any effect.