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>
65 lines
1.9 KiB
Twig
65 lines
1.9 KiB
Twig
{#
|
|
# Product Archive / Shop Page (Bootstrap 5 Override)
|
|
#
|
|
# Main template for the shop page, product category, tag, and attribute archives.
|
|
# Uses a 3+9 column layout with a filter sidebar and product grid.
|
|
#
|
|
# Expected context:
|
|
# page_title - Archive page title
|
|
# has_products - Whether the loop has products
|
|
# products - Array of product objects for the loop
|
|
# sidebar_content - Pre-rendered sidebar HTML
|
|
#
|
|
# WooCommerce PHP equivalent: archive-product.php
|
|
#
|
|
# @package WcBootstrap
|
|
# @since 0.1.0
|
|
#}
|
|
|
|
{% extends "wc-base.html.twig" %}
|
|
|
|
{% block breadcrumbs %}
|
|
{{ do_action('woocommerce_before_main_content') }}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{{ do_action('woocommerce_shop_loop_header') }}
|
|
|
|
{% if has_products is defined and has_products %}
|
|
{{ do_action('woocommerce_before_shop_loop') }}
|
|
|
|
<div class="row">
|
|
{# Sidebar with filters #}
|
|
{% if sidebar_content is defined and sidebar_content %}
|
|
<aside class="col-lg-3 mb-4 mb-lg-0">
|
|
{% include 'global/sidebar.html.twig' %}
|
|
</aside>
|
|
<div class="col-lg-9">
|
|
{% else %}
|
|
<div class="col-12">
|
|
{% endif %}
|
|
|
|
{{ woocommerce_product_loop_start() }}
|
|
|
|
{% if products is defined %}
|
|
{% for product in products %}
|
|
{% include 'content-product.html.twig' with { product: product } %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{{ woocommerce_product_loop_end() }}
|
|
|
|
{{ do_action('woocommerce_after_shop_loop') }}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
{{ do_action('woocommerce_no_products_found') }}
|
|
{% endif %}
|
|
|
|
{{ do_action('woocommerce_after_main_content') }}
|
|
{% endblock %}
|
|
|
|
{% block sidebar %}
|
|
{{ do_action('woocommerce_sidebar') }}
|
|
{% endblock %}
|