I am using the following code to set a variable "tab1visibility" from the twig tweak value for field_hidden based on a block id. {% set tab1visibility = drupal_field('field_hidden', 'block_content', 7) %}
This works perfectly but returns the value with the expected markup.
When I try to use |striptags on this newly created value it returns nothing.
So
{% set tab1visibility = drupal_field('field_hidden', 'block_content', 7) %}
<p>{{tab1visibility}}</p>
returns true or false wrapped in my typical field div templating.
{% set tab1visibility = drupal_field('field_hidden', 'block_content', 7) %}
<p>{{tab1visibility|striptags}}</p>
returns nothing no markup or the raw value.
How do I get just the value without the surrounding markup?