Skip to content
Snippets Groups Projects
Commit f075d6f8 authored by git's avatar git Committed by Alberto Siles
Browse files

Issue #3042068 by sreenivasparuchuri, bharath-kondeti, zenimagine: There is no template for users

parent 17643f3d
No related branches found
No related tags found
No related merge requests found
......@@ -474,6 +474,20 @@ function bootstrap_barrio_theme_suggestions_region_alter(array &$suggestions, ar
}
}
/**
* Implements hook_theme_suggestions_HOOK_alter().
*/
function bootstrap_barrio_theme_suggestions_user_alter(array &$suggestions, array $variables, $hook) {
// Define the view mode.
$sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
$user_id = \Drupal::service('current_user')->id();
$suggestions[] = 'user__' . $sanitized_view_mode;
$suggestions[] = 'user__' . $user_id;
$suggestions[] = 'user__' . $user_id . '__' . $sanitized_view_mode;
return $suggestions;
}
/**
* Implements hook_theme_HOOK_form_alter() for node add/edit.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment