theming – How to use a Twig variable as View name in drupal_view() Twig Tweaks function?


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?