I need to display a list of dates used in entries in a weblog, but the list cannot have a duplicate value. Right now I have this code where “wine_year” is a custom field:
{exp:weblog:entries weblog="wine" limit="10" dynamic="off" orderby="wine_year" sort="desc"}
<li><a href="/wine/year/{wine_year}">{wine_year}</a></li>
{/exp:weblog:entries}Which displays the following:
* 2003
* 2003
* 2002
* 2002
* 2002
* 2001
* 2001
* 2001
* 2001
As you can see there are duplicate values. I would like to display the following:
* 2003
* 2002
* 2001
By the way, I want to use weblog:entries instead of hardcoding the years in a list because I don’t want to display values which are not used in the entries.
How do I go about doing that? I’ve searched everywhere on the forum for an answer but I’m still cracking my brain!