Skip to content

Commit ff3e871

Browse files
committed
Handle title from hook configuration
1 parent 1904ab8 commit ff3e871

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/BootstrapAdminUi/templates/shared/crud/show/content/header/breadcrumbs.html.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
) %}
1313
{% endif %}
1414

15+
{% set title = hookable_metadata.configuration.title|default(null) %}
1516
{% set rendered_field_prefix = hookable_metadata.configuration.rendered_field_prefix|default(null) %}
1617
{% set field_name = hookable_metadata.configuration.rendered_field|default('') %}
1718
{% set rendered_field = rendered_field_prefix ~ (attribute(resource, field_name) is defined ? attribute(resource, field_name) : null) %}
@@ -21,7 +22,7 @@
2122
: {}
2223
%}
2324

24-
{% set resource_show_name = rendered_field|default(resource.translations[app.locale].name|default(resource.code|default(resource.id|default(null)))) %}
25+
{% set resource_show_name = title|default(rendered_field|default(resource.translations[app.locale].name|default(resource.code|default(resource.id|default(null))))) %}
2526

2627
{% if action is defined and action.name is defined %}
2728
{% set show_url = path(configuration.getRouteName('show'), { id: resource.id }) %}

0 commit comments

Comments
 (0)