Skip to content

Commit 3964a00

Browse files
committed
Add theme debugging info
@todo: Remove before deploying to a production environment. Or refactor this as a setting in the theme, or make a relevant module. To access the debugging info, use the 'Inspect' console in your favorite browser. If developing locally, you may also want to enable Twig debugging in twig.config in your services.yml file.
1 parent f7b7413 commit 3964a00

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

themes/nsf/nsf.theme

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
/**
4+
* Implements hook_theme_suggestions_HOOK_alter() for form templates.
5+
* @param array $suggestions
6+
* I found this code on drupal.org https://www.drupal.org/node/2724333
7+
* @param array $variables
8+
*/
9+
function subtheme_theme_suggestions_block_alter(array &$suggestions, array $variables) {
10+
// Block suggestions for custom block bundles.
11+
if (isset($variables['elements']['content']['#block_content'])) {
12+
array_splice($suggestions, 1, 0, 'block__bundle__' . $variables['elements']['content']['#block_content']->bundle());
13+
}
14+
}

0 commit comments

Comments
 (0)