Drupal 8 Module: Twig Field Value

Drupal 8 Module: Twig Field Value

Recently discovered the Twig Field Value module that provides some extra Twig filters. Possibly the most useful is the field_value that renders the string value of the field instead of the entire field array.

You can check for a field value with an if statement like 

{% if content.field_some_field_name | field_value %}

Filters:
- field_label : Returns the field label value.
- field_value : Returns the render array of the field value(s) without the field wrappers.
- field_raw: Returns raw field properties value(s).
- field_target_entity: Returns the referenced entity object(s) of an entity reference field.

Go to the project page https://www.drupal.org/project/twig_field_value to find out more.

Drupal 8 SEO Modules

Drupal 8 SEO Modules

Drupal 8: Disable Twig Cache During Development

Drupal 8: Disable Twig Cache During Development