Print view header using the "Twig Tweak" module I would like to print out the header for a view, but not the rest of the content using the Twig Tweak module. I've tried variations on {{ drupal_view('VIEW_NAME', 'PAGE_NAME', 'view_header') }}, but that prints out the entire view.
I have create simple extension for that:


add the following to MYMODULE.services.yml




    services:
      MYMODULE.twig.render_view_header:
        class: Drupal\MYMODULE\Twig\HeaderView
        tags:
          - { name: twig.extension }




Create HeaderView class inside MYMODULE/src/Twig.
Copy the code from HeaderView.php
Clear cache.
In your twig call the extension like:




{{ render_view_header('VIEW_NAME', 'PAGE_NAME') }}