Answers.Body: <p>I would just <a href="http://twig.sensiolabs.org/doc/filters/slice.html" rel="nofollow"><code>slice</code></a> the randomized array of categories:</p>
  
  <pre><code>{% set ads = craft.categories({
      group: 'ads',
      order: 'RAND()'
  }) %}
  
  {% for ad in ads|slice(0, 2) %}
      {{ ad.externalUrl }}
  {% endfor %}
  
  {% for ad in ads|slice(2, 4) %}
      {{ ad.externalUrl }}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-10T16:27:53.993Z
Answers.Text: Thanks for the fast answer, Carlos. Will try that right away.
Answers.UserDisplayName: Markus Busch
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-10T15:35:12.463Z
Answers.LastActivityDate: 2015-12-10T15:35:12.463Z
Answers.UserDisplayName: carlcs
Body: <p>I have created 12 sponsorship ads for my website using a “sponsor” category.</p>
  
  <p>On my home page I have four sponsorship sections, each holding three sponsorship ads.</p>
  
  <p>How can I randomly distribute those 12 sponsorship ads among the four sponsorship areas with each homepage load?</p>
  
Tags: <templating>
Title: Randomly listing entries in more then one section
ThreadText: # Randomly listing entries in more then one section
  
  (Asked by: username_0 on 2015-12-10)
  
  I have created 12 sponsorship ads for my website using a “sponsor” category.
  
  On my home page I have four sponsorship sections, each holding three sponsorship ads.
  
  How can I randomly distribute those 12 sponsorship ads among the four sponsorship areas with each homepage load?
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-12-10. Score: 1
  
  I would just [`slice`](http://twig.sensiolabs.org/doc/filters/slice.html) the randomized array of categories:
  
  ```
  {% set ads = craft.categories({
      group: 'ads',
      order: 'RAND()'
  }) %}
  
  {% for ad in ads|slice(0, 2) %}
      {{ ad.externalUrl }}
  {% endfor %}
  
  {% for ad in ads|slice(2, 4) %}
      {{ ad.externalUrl }}
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks for the fast answer, Carlos. Will try that right away.  
  
  ---
  
  