Lets say I have an object
foo =[ob1, obj2, obj3 ... obj100 ...]
Now I would like to loop through them in my template but in groups of 5,
So there will be 5 objects per “row”. and in each row I would like to add a class to the first and last one in that row.
Is there a clean why of doing this?
You can use cycle tag:
or: