From 5cbe14464d15529c2729eab47ad29f83f3946306 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 21 Mar 2022 09:53:59 +0100 Subject: [PATCH] fix in view template to display firstname + lastname in title if it exists --- .../Resources/views/ThirdParty/view.html.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig index cdfc168b8..c926e78cc 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig @@ -1,7 +1,8 @@ {% extends "@ChillMain/layout.html.twig" %} {% set thirdParty = entity %} -{% set title_ = 'Show third party %name%'|trans({'%name%' : thirdParty.name }) %} +{% set name = thirdParty.firstname is not empty ? thirdParty.firstname ~ ' ' ~ thirdParty.name : thirdParty.name %} +{% set title_ = 'Show third party %name%'|trans({'%name%' : name }) %} {% block title title_ %}