Questions tagged [ordering]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
439 views

Order by related entries count

I have a channel with a related users field. I want to output all channel entries ordered by the number of related users, this is what i have so far: {% set entries = craft.entries.find({ ...
1
vote
1answer
100 views

Changing the order of an 'archive' page

I'm creating a monthly archive page (for a specified year) for a section. Standard code to output the months and entries as follows: {% set entriesInYear = craft.entries.section('blog').limit(null)....
3
votes
1answer
597 views

Output entries sorted by category title and paginate

I'm stuck on an issue where I have to paginate a list of entries that would be sorted by category title. So basically, I need to: fetch entries in the 'project' section sort those entries by the '...
1
vote
1answer
135 views

Set Parameters from User Input

Is there a way to set parameters from front-end user input? Let's say I have a page that displays a list of entries. On that page, I have a form select called paidStatus with options notReceived, ...
2
votes
1answer
552 views

Loop through entries with custom ordering, showing one from each category then start loop again

I have a channel with entries that may or may not have a custom date field populated. I'd like the display a list of entries, looping through each category, showing one entry from each category. Then ...
1
vote
1answer
91 views

Unable to sort large number of blocks in Matrix field in CP and template

I have about 145 blocks in a single Matrix. If I try and re-arrange (drag&drop) the first few blocks, and then hit save, all is well. However, trying to re-arrange the last few blocks doesn't save ...
0
votes
1answer
265 views

Order merged query by shared field

I’m trying to merge two query sources (some entries and some categories) but have them ordered by a shared field that is a date field. Here’s what I have so far: set classesLocations = craft.entries....
2
votes
1answer
425 views

Order Entries in a Section by Category Titles

I currently have entries from a section output simply using a variable like: {% set beer = craft.entries.section('beverages') %} All of the beer entries have brands assigned to them using the ...
2
votes
1answer
91 views

Output tags in the order they were added to an entry

Is it possible to output tags for an entry page in the order they were added to related entry? For example on a News page I would like to output any/all tags added to the News article on the specific ...
2
votes
1answer
2k views

Sort / Order Entries on select or button click

I have a page on my website were I display alot of entries. Now I want those entries to be sorted by Date, Title etc. I know how to change that hard coded but I want to make it dynamic with a <...
0
votes
1answer
649 views

Is it possible to reorder fields with drag and drop?

I'm trying to understand how most people deal with this likely common issue, I've been looking around for answers, apologies if this is a subjective question, but I imagine there is a 'correct way' of ...
0
votes
1answer
178 views

Change field arrangement from the entries page

In ExpressionEngine you can rearrange the field types from inside the entry. I was wondering if there was any feature like this in Craft? I've got a lot of different types of entries so it's a pain to ...
1
vote
1answer
84 views

Entries Related by Category with Filler Entries After

At the bottom of an entry I want to display links for eight other posts. To make this useful, what I'd like to do is: start with entries that are related to the post currently being viewed by ...
3
votes
2answers
3k views

How Do I group entries by Category and retain fixed Category Order?

I found a solution to grouping entries by category here which is working perfectly but I need the categories in the order they were arranged in the categories tab in the Admin panel. Currently, the ...
1
vote
1answer
128 views

Display entries tagged with specific tag(s) before other entries

What I'm trying to accomplish is looping through a collection of entries and have them display (with pagination) in the following order: entries tagged as Featured in alphabetical (title) order ...
2
votes
1answer
132 views

How to order numbers naturally?

my entries have simple numbers as title (1, 2, 3, ... 10, 11 etc.). I'd like to order them naturally and not 1, 10, 11, 2, 3 etc. Is Craft allowing this?
1
vote
2answers
1k views

Order "Entries Fields" by entry order

I want to order entries in an "Entries field" by the order I added them to the field. So Anastasia would be first and Beni would be last. My only idea was .fixedOrder like you would do it with an ...
5
votes
2answers
3k views

Order entries by category field

I'm loading a set of entries related to 'category' and ordering them by the value of a Dropdown field in the entries. This work well using this code: {% set entries = craft.entries.relatedTo(category)...
1
vote
2answers
335 views

Reverse Assets fixedOrder

Is there a way to reverse the Assets field keeping the fixed order? I've tried a couple of things: myAssetsField.order('fixedOrder desc') //breaks myAssetsField.order('id desc') // wrong, since they'...
1
vote
1answer
524 views

Is it possible to order entries by Entry type title/slug

I would like to order my entries by the entry type they have, so for instance: {% set entries = craft.entries.section('more-info').order('type') %} However, this orders by entry type ID, and not by ...
2
votes
1answer
739 views

Get entries by custom matrix / date time field

I want to list all entries in a section by custom date time fields. A training course has a From field and a To field. These fields are inside a Matrix field. The field name storing this info is ...
3
votes
1answer
896 views

Can random be used for ordering with related/assets, in cached code?

I'm trying to determine if I can update this: {% cache %} [ {% set tags = craft.tags.group('color','season','style','venue').limit(null) %} {% for image in craft.assets.relatedTo(tags).order('...
6
votes
1answer
1k views

How to fix "ambiguous" column error generated when DeleteStaleTemplateCaches is run?

Following up on: Deleting Stale Template Caches Failed Here's what I'm assuming is the tag throwing the error in the DeleteStaleTemplateCaches task. How would I disambiguate this? I'm not sure ...
9
votes
2answers
3k views

Output children of a structure section in reverse order

How do you output the all the children of a structure in a reverse order (assuming the children are limited to max depth). Using the order parameter, Craft requires that you use a second parameter ...
2
votes
2answers
337 views

How to display a tree view of all assets?

I like to display a tree-like view of all files in an asset source: Folder_X File_A File_B Folder_Y File_C Folder_Z ... I know that I can iterate over all assets in a source ({% for file in ...
17
votes
1answer
6k views

Section entries - order by random

I was wondering if it's was possible to order section entries by random. Example: {% for entry in craft.entries.section('team').type('mainPeople').order('title random)) %}
2
votes
2answers
3k views

Sorting categories by the post date of the entries related to them

I need to sort my categories based on the date of entries returned within the category. I am trying to sort sermons from a church by the series they were contained within. I have the sermons grouped ...
5
votes
1answer
664 views

From a template, how can you order entries by one field, and if that field is empty a different field?

Is it possible to put conditions on the ordering of a loop of entries? I have two fields: title and alphaTitle. I want to order alphabetically, by alphaTitle if it has a value, otherwise by title. ...
1
vote
1answer
679 views

Order by related field title

I have a series of talks that have speakers as a related entry. I'm looking for a way to order the talks by the last name of the speaker (the last name is the title of the speaker channel).
3
votes
2answers
390 views

Order entries by "recently modified" date time in control panel

Ok somebody ought to start asking the Totally Green questions, it may as well be me. How do I show the date and time an entry was last manipulated in the control panel? I produce video more than ...
8
votes
1answer
8k views

Order entries by date field

I have a channel section with a handle named 'events'. In my field layout for this section I have a field named eventsDate, which is a Date/Time field. I also have a plain text field called '...
10
votes
4answers
1k views

Order tags by count - e.g. Top 10 Tags Used

I would like to have a Top 10 Tags list in descending order. I'm able to list and limit 10 tags used, but the order parameters are limited to name, group, and date essentially.
4
votes
1answer
444 views

Order Assets by date field

I have a page which lists assets by source. I've added a date field to the asset. How can I order the assets by this field so that the most recent is first? Here is my markup: {% set assets = craft....
4
votes
4answers
285 views

No ordinary news post ordering

I'm trying to work out how I can order news posts by postDate, unless a lightswitch is toggled for a post, at which point it will use the dateUpdated to order that item. This is so a client can still ...
5
votes
4answers
2k views

How to order by matrix field?

I have a section where its entries have a matrix field (matrixField). In the first matrix block there is a date field (dateField). I want to get my entries ordered by that date field. Is this possible?...
3
votes
1answer
810 views

Ordering of ElementCriteriaModel with varying statuses

I have a built a little plugin that calls the Twitter API to add new Tweets from a user timeline as entries, so that I can return them in an ElementCriteriaModel request to be integrated with content ...
8
votes
1answer
4k views

Ordering Entries without using entry date

Looking to explore solutions for ordering entries in a channel. My current ideas are: For example purposes let's say this is for recipes and the client wants to be able to pick the order of recipes ...
14
votes
2answers
2k views

How can I return data from a Matrix field in random order?

I have a slideshow with slide data managed in a Matrix field. How would I go about randomizing the data returned in the template so the slides show in a different order on each page load?

1
2