<% posts_in_year(item[:academic_year]).each_with_index.select {|e, i| i.even?}.map(&:first).each do |post| %> <%= render '/partials/_blog_preview.*', post: post %> <% end %>
<% posts_in_year(item[:academic_year]).each_with_index.reject {|e, i| i.even?}.map(&:first).each do |post| %> <%= render '/partials/_blog_preview.*', post: post %> <% end %>
<% if posts_in_year(@item[:academic_year]).empty? %>

Sorry.

No blog posts yet this year.

Soon TM.

<% end %>