Hi All, I’m sure I’ve approached this before somewhere and have been through all my references but cant seem to locate anything which relates.
Basically I’ve created a gallery based on a basic channel and wish them to be displayed in groups, based on the relevant month and year - for example January 2012 would show all the January images, February 2012 to show Februarys and so on.
I can get these to display in date order no problems, however I would like each group to have a header to seperate each group and not have them just generally listed on one page in order.
For example, using the code below…what would be the best method to throw the header tag within the loop to show just the once before each months entries and repeat thereafter?
{exp:channel:entries channel="main_gallery" sort="desc|asc" orderby="entry_date" limit="60"}
<h2>*** ENTRY MONTH AND YEAR TO GO HERE TO HIGHLIGHT RELEVANT ENTRIES ***</h2>
<p><article class="{switch='image-one|image-two|image-three|image-four|image-five|image-six'}"><br />
{sized}<br />
{name}<br />
</article><br />
{/exp:channel:entries}The only way I could think of was using the archive method but would that be sufficient?
Any help would be appreciated.
Thanks