Pluggable entity view builder
This module allows you to define entity view builders as plugins, which can be configured per entity bundle. It provides a way to theme individual entities and can be integrated with modules like Paragraphs to build customizable landing pages.
Define entity view builders as plugins, defined per bundle. We call it PEVB in short, and heavily rely on it on our Drupal-starter.
Posts
- Bare-Bones Theming in Drupal with PEVB
- https://www.gizra.com/content/pevb-layout-builder/
- https://www.gizra.com/content/pevb-composable-element-trait/
Quickstart
This module comes with an example module, so you could quickly spin it.
- Enable "Pluggable Entity View Builder Example" module.
- Clear cache, so the new settings will kick in.
- Create a new Article node, along with the title, body some tags and an image.
- At this point nothing should happen, as we haven't enabled the setting that
- overrides core's default Node entity view builder.
- Reload the article node, and see how it's theme has changed.
It will look roughly like this:
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:
- Enable the "Pluggable Entity View Builder Paragraphs Example" module.
- Article content type will now have a new "Paragraphs" field.
- Create a few Paragraphs and view the node.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.2.7 | Stable | 10–11 | Fixes the namespace issue with the custom phpstan rule | Apr 10, 2026 | |
| 1.2.6 | Stable | 10–11 | Caching improvements and a new PHPStan rule | Apr 9, 2026 | |
| 1.2.5 | Stable | 10–11 | Mar 9, 2026 | ||
| 1.2.4 | Stable | 10–11 | Bugfix to remove extra output on entities | Mar 5, 2026 | |
| 1.2.3 | Stable | 10–11 | The breaking changes introduced in 1.2.1 have been reverted | Mar 4, 2026 | |
| 1.2.1 | Stable | 8–11 | Mar 3, 2026 | ||
| 1.2.0 | Stable | 8–11 | This release contains a breaking change. Please read the change notices carefully. | Mar 3, 2026 | |
| 2.x-dev | Dev | 10–11 | Mar 3, 2026 | ||
| 1.1.20 | Stable | 8–11 | Dec 16, 2025 | ||
| 1.1.19 | Stable | 8–11 | Jan 24, 2025 | ||
| 1.1.18 | Stable | 8–10 | Add access check argument to getReferencedEntityFromField. | Nov 17, 2024 |