Skip to content

Commit f5f8ac6

Browse files
committed
feat(theme): add additional breadcrumb blocks for better customization
1 parent ab9c6e6 commit f5f8ac6

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

templates/_partials/breadcrumb.tpl

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@
66

77
<nav data-depth="{$breadcrumb.count}" class="{$componentName}__wrapper" aria-label="{$componentName}">
88
<div class="container">
9-
<ol class="{$componentName}">
10-
{foreach from=$breadcrumb.links item=path name=breadcrumb}
11-
{block name='breadcrumb_item'}
12-
<li class="{$componentName}-item">
13-
{if not $smarty.foreach.breadcrumb.last}
14-
<a href="{$path.url}" class="{$componentName}-link"><span>{$path.title}</span></a>
15-
{else}
16-
<span>{$path.title}</span>
17-
{/if}
18-
</li>
9+
{block name='breadcrumb_list_wrapper'}
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}
1923
{/block}
20-
{/foreach}
21-
</ol>
24+
</ol>
25+
{/block}
2226
</div>
2327
</nav>

0 commit comments

Comments
 (0)