title: How to use capture cycle odd even and target specific collection item in Jekyll
body: <p>Hi I'm working on a Jekyll site. I am using a capture cycle for odd and even displays of the collection. I would also like to specifically target which collections are shown on this page.</p>
  
  <p>Here's the code so far:</p>
  
  <pre><code>{% assign sorted = (site.catalog | sort: 'date') | reverse %}
  {% for project in sorted limit: 5 reversed %}
  
  {% capture thecycle %}{% cycle 'odd', 'even' %}{% endcapture %}
      {% if thecycle == 'odd' %}
          {% if project.featured == "1" || project.featured == "3" || project.featured == "5" %}
  &lt;div&gt;{{ project.title }} {{ project.subtitle }}&lt;/div&gt;
  {% endif %}
  
  {% if thecycle == 'even' %}
  &lt;div&gt;{{ project.title }} {{ project.subtitle }}&lt;/div&gt;
  {% endif %}
  {% endfor %}
  </code></pre>
  
  <p>So I would like five items to be shown on this page in total. For the odd cycles, I would like those items to be (1,3,5) to display a certain format, and for the even cycles, I would like those items (2,4) to display a certain format.</p>
  
  <p>The approach I started using would show this variable in the front matter of the collection item:</p>
  
  <p>featured: "1"</p>
  
  <p>Thanks in advance for any help</p>