I've tried so many different things and can't get this to work...
{% set makeCat = craft.categories()
.group('make')
.orderBy('title')
.limit(21) %}
{% paginate makeCat as pageInfo, makeCars %}
{% for make in makeCars %}
{% set entries = craft.entries()
.section('cars')
.carStatus('Inventory')
.relatedTo(make)
.all() %}
{% for entry in entries %}
<p>{{ entry.title }}</p>
{% endfor %}
{% endfor %}
I'm trying to list cars with a status of 'Inventory', order them by a single category field alphabetically by car make and paginate...is this not possible in Craft? This code gets me the closest but doesn't paginate properly. I want the 60+ entries to paginate 21 per page but in order of the make of the car ie. BMW, Ferrari, Porsche, etc. Not sure what I'm missing or doing wrong but any help and direction would be super! Thanks!