From fca13ebe92c0dbfe94c156a8d794cf6db0d63312 Mon Sep 17 00:00:00 2001 From: Pedro Amorim <pedro.amorim@ptfs-europe.com> Date: Thu, 12 Dec 2024 13:01:23 +0000 Subject: [PATCH] Bug 38685: Only render breadcrumb item if content not empty This ensures the '>' caret is only rendered if there is indeed some breadcrumb content. --- .../prog/en/includes/html_helpers.inc | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc index d5af13c7dc6..c91cedfe99a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -474,16 +474,18 @@ [%# Used to build individual breadcrumb items in the breadcrumb nav %] [% BLOCK breadcrumb_item %] - [% IF ( bc_active ) %] - <li class="breadcrumb-item active" aria-current="page"> - <a href="#"> + [% IF content.trim %] + [% IF ( bc_active ) %] + <li class="breadcrumb-item active" aria-current="page"> + <a href="#"> + [% content | $raw %] + </a> + </li> + [% ELSE %] + <li class="breadcrumb-item"> [% content | $raw %] - </a> - </li> - [% ELSE %] - <li class="breadcrumb-item"> - [% content | $raw %] - </li> + </li> + [% END %] [% END %] [% END %] -- 2.39.5