Files
wp-bootstrap/views/partials/pagination.html.twig
magdev cb288d6e74
All checks were successful
Create Release Package / PHP Lint (push) Successful in 49s
Create Release Package / Build Release (push) Successful in 1m18s
v0.1.1 - Bootstrap frontend rendering via Twig templates
Replace FSE block markup on the frontend with proper Bootstrap 5 HTML
rendered through Twig templates. The Site Editor remains functional for
admin editing while the public site outputs Bootstrap navbar, cards,
pagination, grid layout, and responsive components.

New PHP classes: TemplateController, ContextBuilder, NavWalker
New Twig templates: 20 files (base, pages, partials, components)
Enhanced TwigService with WordPress functions and globals

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-08 15:11:00 +01:00

27 lines
1.2 KiB
Twig

{% if pagination and pagination.pages is defined and pagination.pages|length > 1 %}
<nav aria-label="{{ __('Page navigation') }}" class="my-5">
<ul class="pagination justify-content-center">
<li class="page-item{{ pagination.prev_url is null ? ' disabled' : '' }}">
<a class="page-link" href="{{ pagination.prev_url ?? '#' }}"
{% if pagination.prev_url is null %}tabindex="-1" aria-disabled="true"{% endif %}>
{{ pagination.prev_text }}
</a>
</li>
{% for page in pagination.pages %}
<li class="page-item{{ page.is_current ? ' active' : '' }}">
<a class="page-link" href="{{ page.url }}"
{% if page.is_current %}aria-current="page"{% endif %}>
{{ page.number }}
</a>
</li>
{% endfor %}
<li class="page-item{{ pagination.next_url is null ? ' disabled' : '' }}">
<a class="page-link" href="{{ pagination.next_url ?? '#' }}"
{% if pagination.next_url is null %}tabindex="-1" aria-disabled="true"{% endif %}>
{{ pagination.next_text }}
</a>
</li>
</ul>
</nav>
{% endif %}