New answers tagged


Typically I use an ids() query to do that kind of thing, as it is usually more efficient than a full-blown .all(), like this: {% set allPartnerIds = craft.entries.section('partners').limit(null).ids() %} {% set tiersInUse ='catPartnerTeirs').relatedTo(allPartnerIds).all() %} If you have already queried for the partner entries ...


Some of your steps are unclear, but this should get you started. {% for category in craft.categories.all() %} {{ category.title }} {{ category.url }} {% set entry = craft.entries .relatedTo(category) .orderBy('myField1 ASC') .one() %} {% if entry %} {% set image = %} {% if image %} ...


nextSiblingOf() and related methods will only work with Structure entries. What you need instead is next() / prev(): (At the time of writing, the 3.x docs seem to be lacking any detail on next/prev methods, but the 2.x docs seem to cover it here:

Top 50 recent answers are included