Apply page template suggestion to a specific view by a hook? I have a website running Drupal 8.x with different views. I would like to use a page--template.html.twig template basing to the view ID. Is this possible?

I was thinking of using code similar to the following.

function mythemename_theme_suggestions_page_alter(array &amp;$suggestions, array $variables, $hook) {
 if ($hook === 'views_view') {
   if ($variables['view']-&gt;id() === 'movies') {
     $suggestions[] = 'page__movies';
   }
 }
}
First of all, the code is never run, because you have the hook page in the function name and check for the hook views_view. Secondly the variables in a page hook don't contain variables from the view, so you have to get them from the route:

function mythemename_theme_suggestions_page_alter(array &amp;$suggestions, array $variables) {

  $view_id = \Drupal::routeMatch()-&gt;getParameter('view_id');
  if ($view_id === 'movies') {
    $suggestions[] = 'page__movies';
  }

}