I've built a page listing all entries by Character 0-9/A-Z. But unfortunately it's extremely slow loading due to the amount of entries the site has. I'm wondering if I can break out the letters into seperate pages.
Currently everything is on
.../brands/
What I'm looking to do is create
.../brands/a
.../brands/b
.../brands/c
I'm unsure if it's code running to create this or something more in the backend of Craft and how I've created the section. The code currently running the A-Z
{% set entries = craft.entries.section('brands') %}
{% set entriesGrouped = entries|group('title|slice(0, 1)|upper|replace("/[^A-Z]/", "0-9")') %}
{% for letter, entriesInGroup in entriesGrouped %}
<h3>{{ letter }}</h3>
<ul class="store-list">
{% for entry in entriesInGroup %}
<li>
{% for asset in entry.brandLogo.all() %}
<a href="{{ entry.url }}">
<div class="retailer-logo">
<img src="{{ asset.geturl }}" class="img-fluid" alt="{{ entry.title }} Discount Codes & Vouchers"/>
</div>
</a>
{% endfor %}
<a href="{{ entry.url }}" title="{{ entry.title }} Coupon Codes">{{ entry.title }} Coupons</a>
{% endfor %}
</li>
</ul>
<hr>
{% endfor %}