Tiggles ツ
10/23/2019 - 2:57 PM

Sort OrderByThenBy

Organize items into categories, and then sort them within said categories (ie http://cloud.madebyspeak.com/65ee7c | http://cloud.madebyspeak.com/9b9255)

{% assign sorted = List.Items | OrderByThenBy:'FieldValues.RentalType', 'desc', 'FieldValues.RentalTitle', 'asc' %}
{% assign groupRentalType = "" %}
<div class="rental-listing">
   {% for Item in sorted %}
   {% assign ItemRentalType = Item.FieldValues.RentalType %}
   {% unless groupRentalType == ItemRentalType %}
      <h2 class="rental-cat">{{ Item.FieldValues.RentalType }}</h2>
   {% assign groupRentalType = ItemRentalType %}
   {% endunless %}
   <div class="rental-item {{Item.FieldValues.IconImage}}">
      <h5 class="r-title">{{Item.FieldValues.RentalTitle}}</h5>
      <p class="r-greatfor">{{Item.FieldValues.GreatFor}}</p>
      <div class="r-icon"></div>
   </div>
   {% endfor %}
</div>