Problem/Motivation
It would be beneficial to have view suggestions supported out of the box.
/**
* Implements hook_theme_suggestions_HOOK_alter().
*/
function THEME_HOOK_theme_suggestions_views_view_alter(
array &$suggestions,
array $variables
): void {
$view = $variables['view'];
if (
$view instanceof ViewExecutable
&& $display = $view->current_display
) {
$view_id = $view->id();
$original = $variables['theme_hook_original'];
$suggestions[] = "{$original}__$view_id";
$suggestions[] = "{$original}__{$view_id}__$display";
}
}
Issue fork prototype-3483019
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jldust commentedComment #5
jldust commentedComment #6
jldust commentedThis has been merged in and will be included in the next tagged release.