This module provides a filter that converts predefined keywords into links. The keywords and links are defined via a custom administration panel.

Motivation

The module was written to provide site administrators a seamless way to cross link via keywords to internal and external sites, for SEO purposes. You may need to link to an external site if you have multiple sites. For instance, you can link a keyword from your blog site to a product on an e-commerce site. This is implemented as a filter to make linking as seamless as possible. The filter settings include an option to select the content type(s) to apply this filter as well as a way to exclude specific nodes. This is especially useful if you don't have different text formats per content type.

How it works

First an authorized user needs to define the keyword(s)-to-url mapping. Then, when a node is displayed in full (or default) display mode, and this filter is enabled for that node type's textarea fields (e.g. "Body"), this module searches the applicable textarea fields for matching keywords, and replaces them with their corresponding link.

How to use it

  1. Enable the dynamic_links_filter and dynamic_links_filter_ui modules.
  2. Set the 'configure dynamic links filter' permissions.
  3. Go to admin/config/content/dynamic-link-filter to add keyword to url mappings.
  4. Go to admin/config/content/formats to enable the filter on your desired formats.
  5. After enabling the filter, scroll down to select the content types you wish to apply this filter to, and make any other changes you want, then submit.
  6. Navigate to a node page that contains one of the keywords you entered, and see the link!

Limitations

  • The filter only applies to the first occurrence of the keyword in the textarea.
  • The filter only works on node pages in full display mode.
  • Currently, there is no way to bulk import mappings.

Future features

  • Add tests.
  • Convert custom table to Entity. Currently the module uses a custom table with custom code to access it. To make the module more compatible with Drupal, future versions will use Entity API to manage keyword mappings.
  • Provide bulk import.
  • Port to Drupal 8.

Similar Modules

Dynamic Internal Linking. Ideal if you only need to crosslink internal pages.

Sponsors

This module is sponsored by Guideposts

Supporting organizations: 

Project information

Releases