Bug 38685: Only render breadcrumb item if content not empty

This ensures the '>' caret is only rendered if there is indeed some
breadcrumb content.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Pedro Amorim 2024-12-12 13:01:23 +00:00 committed by Katrin Fischer
parent eee149e5a7
commit 7ed014dd1e
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 8 additions and 6 deletions

View File

@ -552,12 +552,14 @@
[%# 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="#"> [% content | $raw %] </a>
</li>
[% ELSE %]
<li class="breadcrumb-item"> [% content | $raw %] </li>
[% 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 %] </li>
[% END %]
[% END %]
[% END %]