From 316aee5192170331041f8ec853f54da2b46bf835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Wed, 9 Nov 2022 13:58:39 +0100 Subject: [PATCH] Move viewTypeName property inside the conditional in block.html.twig, add blockLocale property --- templates/nglayouts/themes/app/block/block.html.twig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/nglayouts/themes/app/block/block.html.twig b/templates/nglayouts/themes/app/block/block.html.twig index 60ca107dc..c1f53bc2e 100644 --- a/templates/nglayouts/themes/app/block/block.html.twig +++ b/templates/nglayouts/themes/app/block/block.html.twig @@ -42,14 +42,14 @@ {% set block_content = (block('content') is defined ? block('content') : '')|trim %} -{% set view_type_name = block.viewType %} +{% if block_content is not empty or show_empty_wrapper %} + {% set view_type_name = block.viewType %} -{% if block.definition.hasViewType(view_type_name, block) %} - {% set view_type_name = block.definition.viewType(view_type_name, block).name %} -{% endif %} + {% if block.definition.hasViewType(view_type_name, block) %} + {% set view_type_name = block.definition.viewType(view_type_name, block).name %} + {% endif %} -{% if block_content is not empty or show_empty_wrapper %} - +