I am trying to create a new twig template that defines different types of views templates - or some sort of option based format.
Example 1:
Generic view blocks: block--views-block.html.twig
Example 2:
News Block specific views with no container: block--views-block--news-elements-block-1.html.twig
Example 3:
List Block specific views with no container: block--views-block--list-elements-block-1.html.twig
What i want to achieve: - if i can present an option on the block, that would also work.
Views block with no container: block--views--no-container--block.html.twig
So far:
function THEME_theme_suggestions_alter(array &$suggestions, array $variables) {
// dpm($variables);
// $content = $variables['elements']['content'];
// if (isset($content['#block_content']) && $content['#block_content'] instanceof \Drupal\block_content\BlockContentInterface) {
// $suggestions[] = 'block__' . $content['#block_content']->bundle();
// }
}