Answers.Body: <p>I recon Supersort is they way to go, as its got some really handy functions to make this sort of thing a breeze. Try with the following:</p>
  
  <pre><code>{% set entries = craft.entries.section('presenters').order('RAND()').limit(10) %}
  {% set sortedEntries = entries | supersort('sortAs', '{lastName}') %}
  
  {% for item in sortedEntries %}
      {{ item.title }}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-12T04:38:55.320Z
Answers.LastActivityDate: 2017-02-12T04:38:55.320Z
Answers.UserDisplayName: crawf
Body: <p>I need to pull X entries with</p>
  
  <pre><code>{% set randEntries = craft.entries.section('presenters').order('RAND()').limit(10) %}
  </code></pre>
  
  <p>But then sort them alphabetically on entry.lastName.</p>
  
  <p>Do I need to <a href="https://github.com/TopShelfCraft/SuperSort" rel="nofollow noreferrer">Supersort</a> for this, and if so, how do I apply it? Do I need to pull the entries first, and then run the sort?</p>
  
Tags: <entries><random><plugin-supersort><sort>
Title: Retrieve entries by random sort, then resort alphabetically
ThreadText: # Retrieve entries by random sort, then resort alphabetically
  
  (Asked by: username_0 on 2017-02-11)
  
  I need to pull X entries with
  
  ```
  {% set randEntries = craft.entries.section('presenters').order('RAND()').limit(10) %}
  
  ```
  
  But then sort them alphabetically on entry.lastName.
  
  Do I need to [Supersort](https://github.com/TopShelfCraft/SuperSort) for this, and if so, how do I apply it? Do I need to pull the entries first, and then run the sort?
  
  **Tags:** entries, random, plugin-supersort, sort
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-02-12. Score: 2 | Accepted answer
  
  I recon Supersort is they way to go, as its got some really handy functions to make this sort of thing a breeze. Try with the following:
  
  ```
  {% set entries = craft.entries.section('presenters').order('RAND()').limit(10) %}
  {% set sortedEntries = entries | supersort('sortAs', '{lastName}') %}
  
  {% for item in sortedEntries %}
      {{ item.title }}
  {% endfor %}
  
  ```
  
  
  ---
  
  