Adding class based on length I'm using Neo to allow my client to be able to create a content grid with child blocks. Now I'm wondering, is there a way that I can change the class of the output based on the number of items?  For example, if there are two items I'd like to have the class grid-one-half and if there are three grid-one-third etc. to give my client more flexibility in making grids.

Thanks!
I figured it out by modifying the code from this answer on image transforms. Here's the basics of my markup.

&lt;div class="{% if loop.length == 2 %}grid-one-half{% elseif loop.length == 3 %}grid-one-third{% elseif loop.length == 4 %}grid-one-quarter{% endif %} grid-item"&gt;
&lt;/div&gt;