View theme override in drupal 8 I am new to drupal 8 and i need to override a views template. So, for that I have enabled theme debug in services.yml to view the twig template suggestion name.

This is my view theme debug.

&lt;!-- THEME DEBUG --&gt;
&lt;!-- THEME HOOK: 'views_view_unformatted__test_content_view' --&gt;
&lt;!-- FILE NAME SUGGESTIONS:
   x views-view-unformatted--test-content-view.html.twig
   x views-view-unformatted--test-content-view.html.twig
   * views-view-unformatted.html.twig
--&gt;


Then, I created the file in templates of drupal8 theme and the theme file calls. I used themename_views_view_unformatted__test_content_view() function to override in themename.theme file but the function doesn't called.

Is there anyway to override the variables coming to the twig template. Can anyone give me suggestion to override the views template.

Thanks in advance.
In your case 'views_view_unformatted__test_content_view' is the theme hook in the render array. In Drupal 8 that will make it possible to use following preprocess functions to modify the variables before they get to the template:


themename_preprocess_views_view_unformatted__test_content_view()
themename_preprocess_views_view_unformatted()


There is more information about preprocess functions available here.