-1

This works:

{{ drupal_view('nursing_resource_blog_teasers', 'block_1') }

But this doesn't:

{% set view_name = "nursing_resource_blog_teasers" %}
{{ drupal_view(view_name , 'block_1') }

It appears that drupal_view() isn't allowing a variable as the View name. Is there a way to make this work?

0
1

Solved it. I forgot about the tags in the field output.

This solved it for me:

{% set view_name = content.field_blog_teaser_block|render|striptags|trim %}

Not the answer you're looking for? Browse other questions tagged or ask your own question.