From 2d8d8ffb487147371853bcbc40946ac6ecc9e29b Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Fri, 30 Apr 2021 01:53:19 +0100 Subject: [PATCH] [TEMPLATES] Add dynamic blocks to right panel --- templates/sidepanel/right/right.html.twig | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/sidepanel/right/right.html.twig b/templates/sidepanel/right/right.html.twig index 7330874754..6f3cd9aad2 100644 --- a/templates/sidepanel/right/right.html.twig +++ b/templates/sidepanel/right/right.html.twig @@ -7,7 +7,15 @@
- {% block right %} - {% endblock right %} + {% set current_path = app.request.get('_route') %} + {% if right_panel_vars is defined %} + {% for block in handle_event('AppendRightPanelBlock', {'path': current_path, 'vars': right_panel_vars}) %} + {{ block | raw }} + {% endfor %} + {% else %} + {% for block in handle_event('AppendRightPanelBlock', {'path': current_path}) %} + {{ block | raw }} + {% endfor %} + {% endif %}
\ No newline at end of file