Created
May 17, 2023 22:46
-
-
Save rvizena/05e5f9f097f73f7eb1a0636cdb481e60 to your computer and use it in GitHub Desktop.
Twig: How to check if a field value is empty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if content.field_myfield is not empty %} | |
{% endif %} | |
https://www.drupal.org/forum/support/theme-development/2016-03-18/how-to-check-if-a-field-value-is-empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment