I am displaying some entries from a channel that has the following fields:
title
news_item_date
document_file
I am only displaying the month and year of the date and this date is used as a heading.
More than one entry may have the same date (month and year) and I would like to display the entries with just one heading.
So instead of
August 2011
Title 1
August 2011
Title 2
July 2011
Title 3
I want the following:
August 2011
Title 1
Title 2
July 2011
Title 3
Hence the month heading is only listed once for each month.
My code is as follows:
{exp:channel:entries channel="business_immigration_news" orderby="news_item_date" sort="desc" limit="15"}
<h3>{news_item_date format="%F %Y"}</h3><p> </p>
<p> <h3 class="documentTitle"><a href="http://{document_file}" title="Download file" target="_blank" rel="noopener">{title}</a></h3> <br />
<br />
{/exp:channel:entries}Any advice on how to achieve this would be appreciated.
Thanks
Paul