Skip to content

Commit e43db8a

Browse files
authored
Merge pull request #940 from Codencode/fix/breadcrumb-block-inheritance
Fix duplicate breadcrumb block declaration in partial
2 parents 5c66c1d + ab8f113 commit e43db8a

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

templates/_partials/breadcrumb.tpl

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@
66

77
<nav data-depth="{$breadcrumb.count}" class="{$componentName}__wrapper" aria-label="{$componentName}">
88
<div class="container">
9-
<ol class="{$componentName}">
10-
{block name='breadcrumb'}
11-
{foreach from=$breadcrumb.links item=path name=breadcrumb}
12-
{block name='breadcrumb_item'}
13-
<li class="{$componentName}-item">
14-
{if not $smarty.foreach.breadcrumb.last}
15-
<a href="{$path.url}" class="{$componentName}-link"><span>{$path.title}</span></a>
16-
{else}
17-
<span>{$path.title}</span>
18-
{/if}
19-
</li>
20-
{/block}
21-
{/foreach}
22-
{/block}
23-
</ol>
9+
{block name='breadcrumb_list'}
10+
<ol class="{$componentName}">
11+
{block name='breadcrumb_items'}
12+
{foreach from=$breadcrumb.links item=path name=breadcrumb}
13+
{block name='breadcrumb_item'}
14+
<li class="{$componentName}-item">
15+
{if not $smarty.foreach.breadcrumb.last}
16+
<a href="{$path.url}" class="{$componentName}-link"><span>{$path.title}</span></a>
17+
{else}
18+
<span>{$path.title}</span>
19+
{/if}
20+
</li>
21+
{/block}
22+
{/foreach}
23+
{/block}
24+
</ol>
25+
{/block}
2426
</div>
2527
</nav>

0 commit comments

Comments
 (0)