File tree 2 files changed +13
-0
lines changed
src/Symfony/Bundle/WebProfilerBundle
Resources/views/Collector
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ CHANGELOG
6
6
7
7
* Add a "role=img" and an explicit title in the .svg file used by the web debug toolbar
8
8
to improve accessibility with screen readers for blind users
9
+ * Add a link of the current rendered template on the twig tab of the web debug toolbar
10
+ to improve user experience and make the debug easier
9
11
10
12
6.1
11
13
---
Original file line number Diff line number Diff line change 62
62
<b >Macro Calls</b >
63
63
<span class =" sf-toolbar-status" >{{ collector .macrocount }}</span >
64
64
</div >
65
+ <div class =" sf-toolbar-info-piece" >
66
+ <b >Current rendered template</b >
67
+ {%- set template = collector .templates | keys | first -%}
68
+ {%- set file = collector .templatePaths [template ]| default (false ) -%}
69
+ {%- set link = file ? file | file_link(1 ) : false -%}
70
+ {% if link %}
71
+ <a href =" {{ link }}" title =" {{ file }}" >{{ template }}</a >
72
+ {% else %}
73
+ {{ template }}
74
+ {% endif %}
75
+ </div >
65
76
{% endset %}
66
77
67
78
{{ include (' @WebProfiler/Profiler/toolbar_item.html.twig' , { link : profiler_url }) }}
<
371D
div class="d-flex flex-row">
You can’t perform that action at this time.
0 commit comments