Skip to content

Instantly share code, notes, and snippets.

@bratsun
Created October 11, 2016 08:35
Show Gist options
  • Save bratsun/93fd60631f41ea09fb08b608e1b33c34 to your computer and use it in GitHub Desktop.
Save bratsun/93fd60631f41ea09fb08b608e1b33c34 to your computer and use it in GitHub Desktop.
Check if field value is true and add optional class
{% if item.content['#block_content'].field_image_right.value == '1' %}
{% set options = options|merge(['image-right']) %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment