You've already forked wc-bootstrap
Add 9 Twig template overrides for WooCommerce's global and notice templates: - global/wrapper-start, wrapper-end: conditional container with _theme_wrapped - global/breadcrumb: Bootstrap breadcrumb component with aria-current - global/sidebar: offcanvas-lg for mobile, standard aside for desktop - global/quantity-input: input-group with +/- buttons - global/form-login: responsive form with form-control, form-check - notices/notice, error, success: Bootstrap alert-dismissible with icons Supporting changes: - assets/js/quantity.js: +/- button handler respecting min/max/step - assets/css/wc-bootstrap.css: WooCommerce notice fallback styles, spinner removal - functions.php: register quantity.js script 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 (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 %}
|