{if file_exists("templates/$template/includes/overwrites/breadcrumb.tpl")}
    {include file="{$template}/includes/overwrites/breadcrumb.tpl"}  
{else}
    {if !isset($RSThemes['addonSettings']['hide_breadcrumbs']) || $RSThemes['addonSettings']['hide_breadcrumbs'] != "enabled"}
        <ol class="breadcrumb">
            {foreach $breadcrumb as $item}
                <li {if $item@last} class="active"{/if}>
                    {if !$item@last}
                        <a tabindex="0" href="{$item.link}">{$item.label}</a>
                    {else}
                        {if $templatefile == 'viewinvoice' && isset($invoicenum)}
                            {$LANG.invoicenumber}{$invoicenum}
                        {else}
                            {$item.label}
                        {/if}
                    {/if}
                </li>
            {/foreach}
        </ol>
        {if isset($breadcrumb) && is_array($breadcrumb) && count($breadcrumb) > 0 && $RSThemes.addonSettings.show_schema == 'on'}
            <script type="application/ld+json">
                {literal}
                    {
                    "@context": "https://schema.org",
                    "@type": "BreadcrumbList",
                    "itemListElement": [
                    {/literal}
                        {foreach $breadcrumb as $item}
                        {literal}{{/literal}
                        "@type": "ListItem",
                        "position": {$item@iteration},
                        {if $templatefile == 'viewinvoice' && isset($invoicenum) && $item@last}
                            {capture name="bcName"}{$LANG.invoicenumber}{$invoicenum}{/capture}
                            "name": {$smarty.capture.bcName|json_encode}
                        {else}
                            "name": {$item.label|json_encode}
                        {/if}
                        {if !$item@last},"item": {$item.link|json_encode}{/if}
                        {literal}}{/literal}{if !$item@last},{/if}
                        {/foreach}
                    {literal}
                    ]
                    }
                {/literal}
            </script>
        {/if}
    {/if}
{/if}