Viewing relations with Relation Dummy Field

Last updated on
30 April 2025

The Relation Dummy Field module provides a pseudo-field that can be added like other fields on your site.

  • When viewing an entity, the field allows displaying relations and (other) end points in any relations where the currently viewed entity is included.

Adding the Relation Dummy Field

The Relation Dummy Field can be added to a content type, or any other fieldable entity bundle, just as other fields. It has the field type name relation and it does not have any edit widgets.

The settings for the field are minimal – the only special setting is relation type, allowing you to select which relation type this field should list.

Using Relation Dummy Field to display relation data

The main purpose of the Relation Dummy Field is found on the manage display tab when managing fields. The widget allows for displaying relation data in three different ways:

  • Default: This gives a list of all relations where the viewed entity is included, each relation having a bullet list with all its end points. (Note that any additional fields on the relations are not displayed.)
  • Other endpoint: This provides a bullet list of all end points in all relevant relations – excluding the currently viewed entity. (Note that the actual relations are not displayed – only the end points.)
  • Natural language: This will give a bullet list similar to the "other endpoint" formatter, but each list item will say [this entity] [relation label] [other endpoint] – for example Alice is sibling with Bob. If the relation is directional, any reverse label will be used to describe a reverse relation.

Functionality similar to this, but more flexible, can be created using the Views module. (See separate section for more information.)

Help improve this page

Page status: Not set

You can: