Field Formatter

Field Formatter module adds formatters for entity reference fields to output only a specific field. This module provides two formatters: Field formatter with inline settings and Field formatter from view display.

Installation

  1. Download Field Formatter from Drupal.org.
  2. Install it in the usual way.

Usage

  1. Create entity reference field:

    • On admin/structure choose Content types.

      Step 1

    • Choose content type entity reference field should be added to, for example: Article, and click Manage fields.

      Step 2

    • Click + Add field.

      Step 3

    • From References dropdown menu choose Other, fill the Label and click Save and continue.

      Step 4

    • Choose Type of item to reference, for example: Content, and click Save field settings.

      Step 5

    • Select which content types you want to reference in Reference type section, for example: Article, and click Save settings.

      Step 6

  2. Choose field formatter for your entity reference field:

    • Open Manage display page for the selected content type (in our case Article).

      Step 7

    • Choose which formatter you want to use on your entity reference field, Field formatter with inline settings or Field formatter from view display.

      Step 8

    • In formatter settings define which field from the referenced entity you want to display in your article.

      Step 9

    • You also need to configure View mode if you're using Field formatter from view display
    • Click Update and then Save.

      Step 10

  3. Create a new node (in our case Article) with entity reference field:

    • In admin/content click + Add content.

      Step 11

    • Choose node to create (in our case Article).

      Step 12

    • Fill Title and all the other fields, for your entity reference field choose entity (or in our case Article) you want to reference and click Save and publish.

      Step 13

    • The chosen field from referenced entity is displayed on the saved article page.

results matching ""

    No results matching ""