Skip to main content
Image
Drupal logo

Learn about the Entity Bundle Field module

I recently contributed the Entity Bundle Field module to drupal.org . This simple but very useful module creates a new type of " Entity Bundle Reference " field that is capable of referencing all types of content and vocabularies on your website.

Entity Bundle Field was born from the need to send certain information in a decoupled Drupal project, where necessary information such as content type and vocabulary is sent from the JSON API.

How to use Entity Bundle Field

First, install and enable the module like any other from the module's web page . It is highly recommended to do it through composer , to keep better control of dependencies and future updates.

Once enabled on your website, locate any entity and create a field with the new available field type: Entity Bundle Reference .

During the field creation process, you will be able to determine which entity will be listed, choosing between Content Types or Vocabularies.

Finally, locate the field from the Form Display Administration and when you modify the content, you will be able to select between the bundles of the entity that you selected during the field configuration.

Use cases

Despite being a relatively simple module, it can have very useful applications in the development of a Drupal portal. Some use cases can be:

  • Send information necessary for the front-end via JSON API.
  • Manage a type of paragraph that allows you to select Content Types or Vocabularies.
  • MegamenΓΊs.
  • Save information attached to an entity in configuration.

Join the Drupal Sapiens Community

Save content that interests you, connect with others in the community, contribute to win prizes and much more.

Login or create an account here

Featured

Last news