Git Product home page Git Product logo

field_formatter's Introduction

Field Formatter

Field Formatter module provides a collection of generic formatters for entity reference fields that output only a specific field of the referenced entity. There are currently three formatters:

  • Field formatter with inline settings (Entity reference fields)
  • Field formatter from view display (Entity reference fields)
  • Link field formatter, which will wrap output of any other formatter with a link (all fields)

Installation

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

Usage

In order to use the "Field formatter with inline settings" and "Field formatter from view display":

  1. Create entity reference field:
  • On admin/structure choose Content types.
  • Choose content type entity reference field should be added to, for example: Article, and click Manage fields and then + Add field.
  • From References dropdown choose Other, fill the Label and click Save and continue.
  • Choose Type of item to reference, for example: Content, and click Save field settings.
  • Select which content types you want to reference in Reference type section, for example: Article, and click Save settings.
  1. Choose field formatter for your entity reference field:
  • Open Manage display page for the selected content type (in our case Article).
  • Choose which formatter you want to use, Field formatter with inline settings or Field formatter from view display.
  • In formatter settings define which field from the referenced entity you want to display in your article.
  • You also need to configure View mode if you're using Field formatter from view display.
  • Click Update and then Save.

In order to use the "Field Linker" formatter:

  1. Go to your entity's manage display page.
  2. On the field you want to be wrapped with a link, select the formatter to be Field Linker.
  3. This will wrap this field in a link pointing to the main entity's URL.

field_formatter's People

Contributors

dawehner avatar marcoscano avatar sanja990 avatar slashrsm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.