function umami_theme_suggestions_block_alter

Same name and namespace in other branches
  1. 8.9.x core/profiles/demo_umami/themes/umami/umami.theme \umami_theme_suggestions_block_alter()
  2. 10 core/profiles/demo_umami/themes/umami/umami.theme \umami_theme_suggestions_block_alter()
  3. 11.x core/profiles/demo_umami/themes/umami/umami.theme \umami_theme_suggestions_block_alter()

Implements hook_theme_suggestions_HOOK_alter() for block templates.

File

core/profiles/demo_umami/themes/umami/umami.theme, line 59

Code

function umami_theme_suggestions_block_alter(array &$suggestions, array $variables) {
    // Block suggestions for custom block bundles.
    if (isset($variables['elements']['content']['#block_content'])) {
        array_splice($suggestions, 1, 0, 'block__bundle__' . $variables['elements']['content']['#block_content']->bundle());
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.