I’m trying to find a way to list all years where there is an entry in a particular channel. I’ve considered using a category for this, but it seems redundant as this is an events channel and there is already a date associated with each entry.
The reason for this is that I have a jQuery filter I wrote that dynamically loads entries based on year. The way I plan on approaching this (if I can’t find a better answer) is looping over all entries in the channel, pushing all date years into an array, compare the years to limit to one instance per year, and then loop over the array to make a UL of the entries resulting in something like:
<ul>
<li>2012</li>
<li>2011</li>
</ul>However, this seems like an incredible amount of requests (say if there are 500 events) to find out what years have an entry inside them. Just wondering if there is a better way in the EE syntax that I didn’t come across in my extensive searching.
Thanks in advance!