Files
wc-bootstrap/templates/layouts/archive.html.twig
magdev c3b16b68c5 Fix unstyled pages: rename base.html.twig to avoid parent collision
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>
2026-02-28 12:29:20 +01:00

62 lines
2.2 KiB
Twig

{#
# Archive/Search Layout (Bootstrap 5 Override)
#
# Layout for search results and archive pages.
# 3+9 column split: filter sidebar + results grid.
#
# @package WcBootstrap
# @since 0.1.0
#}
{% extends "wc-base.html.twig" %}
{% block content %}
<div class="mb-4">
{% block archive_header %}
<header class="mb-4">
<h1>{{ page_title|default(__('Search Results'))|esc_html }}</h1>
{% if results_count is defined %}
<p class="text-body-secondary">
{{ _n('%d result found', '%d results found', results_count)|format(results_count) }}
</p>
{% endif %}
</header>
{% endblock %}
<div class="row">
{% block archive_sidebar %}
<aside class="col-lg-3 mb-4 mb-lg-0">
{% block search_filters %}{% endblock %}
</aside>
{% endblock %}
<div class="col-lg-9">
{% block archive_results %}
{% if results is defined and results|length > 0 %}
<div class="row row-cols-1 row-cols-md-2 g-4">
{% for post in results %}
<div class="col">
{% block result_card %}
{% include 'components/card.html.twig' with {post: post} %}
{% endblock %}
</div>
{% endfor %}
</div>
{% else %}
<div class="alert alert-info" role="alert">
<p class="mb-0">{{ __('No results found. Try adjusting your filters.') }}</p>
</div>
{% endif %}
{% endblock %}
{% block pagination %}
{% if max_pages is defined and max_pages > 1 %}
{% include 'components/pagination.html.twig' %}
{% endif %}
{% endblock %}
</div>
</div>
</div>
{% endblock %}