Let’s create something better together.

If you prefer phones, we have one of those too: +1 978 455 4515










    • Project Info
      icon
    • Technology
      icon
    • Contact Details
      icon







      BackNext








      Back

      • Mar 2018
      • Drupal

      Entity Reference & Entity Reference View In Drupal 8

      What is Entity Reference?

      The term “Entity Reference” literally means reference to the entity. Entities are used to store data, which could be a node, a user, a taxonomy term, or a custom drupal development.

      Entity Reference is an important module to build relationships between entities in Drupal. Below are some of the examples of relationship:

      1) A taxonomy term associated with a user account.
      2) A parent content that references a child content element.

      How to use Entity Reference?

      Below are the steps to use entity reference in Drupal 8.

      Step1: Create settings related to Entity Reference module from backend.
      Step2: Create Content type.
      Step3: Add/Edit fields of content type through Home -> Administration -> Structure -> Content Types -> Content type (ie:user) -> Manage fields, Add a new Entity Reference field.
      Step4: Choose the number of values.
      Step5: Set Entity Reference type.
      Step6: Select Entity Reference method.
      Step7: Set the target bundles.
      Step8: For Views: Filter by an entity reference view and follow screen-shots, below.

      As we complete above steps – you can view changes in front as well.

      What Is Entity Reference View?

      For Drupal content creators, Entity Reference Views is a great way to make content management easier.
      Normally, when users create content on the site, each field is very plain. However, Entity Reference Views allows you to provide for more information. For example, instead of just showing a list of users, your content creators can browse through a list of names, photos and personal details.

      How to use Entity Reference View?

      Steps to use Entity Reference View in Drupal 8.
      1) Create a content View.
      2) Add a field with the Entity Reference View.

      Below are the steps that combine steps of Entity Reference and Entity Reference View explained with screenshots.

      drupal 8 content type

      drupal 8 content type

      drupal 8 add entity reference type field

      drupal 8 content type

      Create Another Entity Reference View

      drupal 8 add entity reference type

      drupal 8 reference type

      Hope the article helps you how to use Entity reference module in your project. If you need help or have any follow up questions, please don’t hesitate to contact us @ info@cmsminds.com. cmsMinds is a drupal web development company in Raleigh,NC, based in Raleigh with expertise in open source CMS (WordPress, Drupal) and PHP.

      Recent Blog
      VIEW ALL BLOGS