You've already forked wc-bootstrap
The child's templates/base.html.twig was shadowing the parent's views/base.html.twig (full HTML page shell) because prependPath() made Twig find the child's minimal wrapper first. Rename to wc-base.html.twig so the parent's page shell renders correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38 lines
1.3 KiB
Twig
38 lines
1.3 KiB
Twig
{#
|
|
# Shop Breadcrumb (Bootstrap 5 Override)
|
|
#
|
|
# Replaces WooCommerce's breadcrumb with Bootstrap 5 breadcrumb component.
|
|
# Skipped when parent theme is wrapping (wc-base.html.twig handles breadcrumbs).
|
|
#
|
|
# Expected context (from WooCommerce woocommerce_breadcrumb()):
|
|
# breadcrumb - Array of [label, url] tuples
|
|
# wrap_before - Opening HTML (ignored, we use Bootstrap markup)
|
|
# wrap_after - Closing HTML (ignored)
|
|
# before - Before each item (ignored)
|
|
# after - After each item (ignored)
|
|
# delimiter - Between items (ignored, Bootstrap uses CSS)
|
|
#
|
|
# WooCommerce PHP equivalent: global/breadcrumb.php
|
|
#
|
|
# @package WcBootstrap
|
|
# @since 0.1.0
|
|
#}
|
|
|
|
{% if breadcrumb is defined and breadcrumb|length > 0 %}
|
|
<nav aria-label="{{ __('Breadcrumb') }}">
|
|
<ol class="breadcrumb">
|
|
{% for crumb in breadcrumb %}
|
|
{% if not loop.last and crumb[1] is defined and crumb[1] %}
|
|
<li class="breadcrumb-item">
|
|
<a href="{{ crumb[1]|esc_url }}">{{ crumb[0]|esc_html }}</a>
|
|
</li>
|
|
{% else %}
|
|
<li class="breadcrumb-item active" aria-current="page">
|
|
{{ crumb[0]|esc_html }}
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ol>
|
|
</nav>
|
|
{% endif %}
|