Questions tagged [ordering]

The tag has no usage guidance.

8 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
313 views

Order entries by custom date field

I want to modify this query so that the dated entries are sorted in descending order on a custom field called 'startDate'. Have tried adding .order('startDate') to the end of the craft.entries(query)....
2
votes
0answers
189 views

Sort entries by related entry title

I’m trying to sort entries from a section called exhibitions by startDate and then by the title field of a related gallery entry. So exhibition entries with the same entry.startDate are ordered ...
1
vote
0answers
32 views

Order element query by number of related categories

I'm building an entry template that displays related entries to the current entry. To be related, an entry needs to be the same type as the current entry and share at least one category in one of two ...
1
vote
0answers
89 views

How to sort entries of a timeline?

I am building a timeline which I want to paginate. For this to be efficient, the timeline entries should be in a linear order. The challenge is that entries before present (BP) have to be in ...
1
vote
0answers
182 views

Order Entries by Category Fields (with fallback)

This is almost a duplicate of this question I have a section which I want to sort by category field. But the categories are not mandatory. When I apply |group('refSorter.first().title') it will ...
1
vote
0answers
245 views

Craft Commerce: Sort products by Sale price

Trying to sort products by price. {% set products = craft.commerce.products({ type: 'footwear', limit: shopSettings.productsPerPage, order: 'defaultPrice asc', }) %} It works fine. Please ...
1
vote
0answers
99 views

Different order per locale for Structures

I know this is a long shot, but is there a way to order a Structure differently per locale? As in the standard drag and drop ordering that comes with a structure but with the ordering saved for each ...
0
votes
0answers
41 views

Multiple structures sharing the same entries?

I'm working on a site that currently has one structure ("projects") that organizes my entries for each specific project. In the admin I can reorder these entries manually... so far so good! ...