below is my code for my list that will be displaying images, 4 to a row two rows max. I need a class of “last” for the 4th and 8th li. please help as what i have here is not working. I’m currently using the FF Matrix with nGen
<h2>Photos</h2>
<ul>
{sub-photos}
<li class="detailsImages002 {if count == "4" OR count == "8"}last{/if}">
{exp:imgsizer:size src="{sub-photo}" width="125" height="83" alt="{title}"}</li>
{/sub-photos}
</ul>
Some experimenting has shown that row_count start from 0 so you will need -
[if row_count == 3 OR row_count == 7}
In fact you can use this same principal to control your header (in case there are no entries)
{sub-photos}
{if row_count == 0}
<h2>Photos</h2>
<ul>
{/if}
<li class="detailsImages002{if count == 3 OR count == 7} last{/if}">
{exp:imgsizer:size src="{photo-img}" width="125" height="83" alt="{photo-title}"}
</li>
{if row_count == total_rows}
</ul>
{/if}
{/sub-photos}
Some things to note:
Let me know if this doesn’t make sense.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.