Created
February 10, 2023 16:11
-
-
Save isramv/21912a814f4438400f8ed7eaded388c4 to your computer and use it in GitHub Desktop.
How to check if a multiple paragraph 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
{% set preprinted_supplies = node.field_issue_calendar.value %} | |
{% set preprinted_supplies_not_empty = [] %} | |
{% for item in preprinted_supplies %} | |
{% set psp = drupal_field('field_preprinted_supplied_pieces', 'paragraph', item.target_id) %} | |
{% if psp['#title'] is not null %} | |
{% set preprinted_supplies_not_empty = preprinted_supplies_not_empty|merge(['true']) %} | |
{% endif %} | |
{% endfor %} | |
{% if preprinted_supplies_not_empty|length > 0 %} | |
<th scope="col">PREPRINTED SUPPLIED PIECES DUE</th> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment