Define entity view builders as plugins, defined per bundle. We call it PEVB in short, and heavily relay on it on our Drupal-starter.

Quickstart

This module comes with an example module, so you could quickly spin it.

  1. Enable "Pluggable Entity View Builder Example" module.
  2. Clear cache, so the new settings will kick in.
  3. Create a new Article node, along with the title, body some tags and an image.
  4. At this point nothing should happen, as we haven't enabled the setting that
  5. overrides core's default Node entity view builder.
  6. Reload the article node, and see how it's theme has changed.

It will look roughly like this:

PEVB output

Paragraphs Integration

PEVB has integration with Paragraphs module, as Paragraphs are nothing more than an entity, similar to a Node.

With the Paragraphs module, we may create landing pages such as the homepage, search
page, contact us, etc., that are highly customizable by site administrators.
This can be an alternative to core's Layout builder, in that it allows
developers to theme each element by itself, while site administrators can mix
and match those elements into a page.

See it in action:

  1. Enable the "Pluggable Entity View Builder Paragraphs Example" module.
  2. Article content type will now have a new "Paragraphs" field.
  3. Create a few Paragraphs and view the node.

Posts

Supporting organizations: 

Project information

Releases