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 &$suggestions, array $variables, $hook) {
if ($hook === 'views_view') {
if ($variables['view']->id() === 'movies') {
$suggestions[] = 'page__movies';
}
}
}