Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How do I count articles in a list and act on even numbers?
Hi there,
In my article lists (each section’s landing page) I want to apply a certain css attribute only to every 2nd, 4th, 6th etc (basically the even numbers) article in that list, I’m fairly sure this could be achieved using <txp:variable> and <txp:if_variable>, or maybe the aks_var plugin but am not clever enough to work it out.
Could someone please suggest a method to me?
Many thanks,
Phil
Offline
Offline
Re: How do I count articles in a list and act on even numbers?
Thanks Jukka, that worked like a charm!
Offline
Re: How do I count articles in a list and act on even numbers?
Offline