This project is not covered by Drupal’s security advisory policy.

Synopsis

This is a very simple module to be able to show related content.

The module provides a custom block that will show a list of related nodes. At the moment all content types will be displayed in the block.

The related content for the current node is calculated by checking taxonomy terms coincidences. All terms associated with a node are checked, from all vocabularies.
The nodes with the most coincidences in taxonomy terms with the current one will be showing up first in the list.

There is also a configuration page available for the module, where you can set:

  • Block title (Removed in D8 version)
  • Number of elements to be displayed
  • Display type to use for rendering the nodes (i.e. Teaser, Full, etc.)

This module also provides an API so if you don't want to use the provided block, you can make a function call to get a list of related nodes. For example:

  • In Drupal 7: relatedbyterms_get_related_nodes($nid);
  • In Drupal 8: \Drupal::service('relatedbyterms.manager')->getRelatedNodes($nid);

Those calls will return an array of related nodes that your own module can work with.

Instalation

Download and install the module as usual.
Go to Structure > Blocks and add the "Related by Terms: Shows related content by terms" block into the any of your theme regions.
Go to Configuration > Content authoring > Related by Terms configuration, and configure your block.
Add some taxonomy terms to your nodes.
Now you are done.

This module works best with:

  • Display Suite: Not needed at all but may simplify the display of your related nodes.

Roadmap

This is what is planned for next releases:

  • Restrict content types to be displayed
  • Add more configuration options

Known problems

None yet.

Dependencies

None.

Project information

Releases