Skip to content

Commit

Permalink
Added support for disabled translation in breadcrumb (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 authored and greg0ire committed Oct 13, 2016
1 parent 2e29f35 commit 85a3132
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Resources/views/Block/breadcrumb.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ file that was distributed with this source code.
#}

{% extends 'knp_menu_ordered.html.twig' %}
{% block label %}{{ item.label|trans(item.getExtra('translation_params', {}), item.getExtra('translation_domain', 'SonataSeoBundle')) }}{% endblock %}

{% block label %}
{% set translation_domain = item.getExtra('translation_domain', 'SonataSeoBundle') %}
{% if options.allow_safe_labels and item.extra('safe_label', false) %}
{{- item.label|raw -}}
{% elseif translation_domain is sameas(false) %}
{{- item.label -}}
{% else %}
{{- item.label|trans(item.getExtra('translation_params', {}), translation_domain) -}}
{% endif %}
{% endblock %}

{% block list %}
{% spaceless %}
Expand Down

0 comments on commit 85a3132

Please sign in to comment.