Overview

What is a sorting rule? A sorting rule allows you to sort your query results. You might want to sort your results so the newest asset is always at the top of your block. Or list businesses alphabetically by title. Or list your classifieds results randomly. 

+5 
How do I use sorting rules - overview

Default Sorting rules

Depending on the block type you're creating, you may see default sorting rules upon the initial creation of a block. The example below is an Editorial block type's sorting rule, where the block displays the newest asset at the top of the list.  

For example, Start date/time: newest first

This sorting rule will look at both the date and time of all assets in the query results. It will first sort the assets by date, and then the newest time within each date. 

+5 
How do I use sorting rules - default rules

Creating a Sorting Rule

EXAMPLE - Let's create a block for showing Pet stories that our readers may have overlooked. An "In case you missed it" block. 

Because the content is not time sensitive, in our example we want to first remove the existing sorting rule that is there by default.

 Under Sorting rules, we're going to click on the rule Start date/time (newest first) and click Remove. 

+5 
1 - How do I use sorting rules

 Under Sorting rules, click Add

+5 
2 - How do I use sorting rules

 Choose a sorting rule

This is where you need to decide how you want your content sorted. Do you want to show the newest stories by their start date and time? Or an alphabetical list of businesses by the business' title? This will help you decide what types of rules to add to your block.

In our example, we're going to select Random, as we don't have a preference of the order which the Pet stories are shown. The Direction options change depending on the rule selected. You'll notice the Direction options are grayed out when using Random. 

+5 
3 - How do I use sorting rules

  Reviewing Query results

If you're satisfied with your results, click Save changes. Or you can continue to refine your sorting rules.

+5 
4 - How do I use sorting rules

 Once you have query rules created and sorted, you can then determine whether you need to do any of the following tasks: