You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yesterday during @drupaleasy
office hours, I learned that in the #drupal Views module, although it does not indicate it, the “No results behavior” text area (on each field) does allow Twig syntax (similar to the “Rewrite results” text area. )
The example we were working with involved using a fallback image dependent on the content type if the image field was empty. Something like:
From Mike Anello on Twitter
Yesterday during
@drupaleasy
office hours, I learned that in the #drupal Views module, although it does not indicate it, the “No results behavior” text area (on each field) does allow Twig syntax (similar to the “Rewrite results” text area. )
The example we were working with involved using a fallback image dependent on the content type if the image field was empty. Something like:
{% if type=="article" %}
{{ drupal_view('hero_block', 'block_2') }}
{% else %}
{{ drupal_view('hero_block', 'block_3') }}
{% endif $}
The text was updated successfully, but these errors were encountered: