From 5fc718662d36d6dd0e09f931c0a124eafb439a27 Mon Sep 17 00:00:00 2001 From: markus-moser Date: Tue, 6 Aug 2024 16:57:15 +0200 Subject: [PATCH] Update layout.html.twig --- templates/layouts/layout.html.twig | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/templates/layouts/layout.html.twig b/templates/layouts/layout.html.twig index ab4c20d0..9a3f1f39 100644 --- a/templates/layouts/layout.html.twig +++ b/templates/layouts/layout.html.twig @@ -1,3 +1,7 @@ +{# we're rendering the content block first to ensure that pimcore_head_* helper calls within all templates used within the content block are executed before the layout gets rendered #} +{% set content %} + {{ block('content') }} +{% endset %} @@ -54,8 +58,7 @@ {% set isPortal = ((isPortal is defined) and isPortal) %} {% endapply %} - {# we're using the deferred extension here to make sure this block is rendered after all helper calls #} - {% block layout_head_meta deferred %} + {% block layout_head_meta %} {{ pimcore_head_title() }} {{ pimcore_head_meta() }} @@ -65,7 +68,7 @@ {% endblock %} - {% block head_stylesheets deferred %} + {% block head_stylesheets %} {{ pimcore_head_link() }} {% endblock %} @@ -132,7 +135,7 @@ {% if isPortal %} - {{ block('content') }} + {{ content }} {% else %}
@@ -159,7 +162,7 @@ {{ pimcore_render_nav(breadbrumbs, 'breadcrumbs') }}
{% endif %} - {{ block('content') }} + {{ content }}
{% if leftNavShow %}