Skip to content

Commit

Permalink
Don't truncate breadcrumb components when "safe_label" is used
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys authored and OskarStark committed Sep 24, 2019
1 parent 61826c0 commit eb73a6c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Resources/views/standard_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,22 @@ file that was distributed with this source code.
{%- set label = label|trans(menu.extra('translation_params', {}), translation_domain) -%}
{%- endif -%}

{% set label = label|truncate(100) %}

{% if not loop.last %}
<li>
{% if menu.uri is not empty %}
<a href="{{ menu.uri }}">
{% if menu.extra('safe_label', true) %}
{{- label|raw -}}
{% else %}
{{- label -}}
{{- label|truncate(100) -}}
{% endif %}
</a>
{% else %}
<span>{{ label }}</span>
<span>{{ label|truncate(100) }}</span>
{% endif %}
</li>
{% else %}
<li class="active"><span>{{ label }}</span></li>
<li class="active"><span>{{ label|truncate(100) }}</span></li>
{% endif %}
{% endfor %}
{% endif %}
Expand Down

0 comments on commit eb73a6c

Please sign in to comment.