Active
Project:
Prototype
Version:
5.5.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 May 2026 at 15:16 UTC
Updated:
12 May 2026 at 15:16 UTC
Jump to comment: Most recent
A number of projects lately I've been using a utility to help determine if a field is empty in Twig or not. This has been put out in the Utility Belt module. The has_content variable checks fields against whether they exist, if they're used on Manage Display, and if they're empty. Lastly it also accounts for whether the field is empty, but loaded within Layout Paragraphs/Mercury Editor and therefore we need the default UI to place new components.
We should consider making this approach our standard on new builds.
Comments