Hi,
I have a collection of pages called $artists, which is sorted alphabetically by lastName, which is a field on each of the pages.
I now need to split this collection alphabetically if possible, so whenever the first letter of lastName changes I output a little header. Something like this:
A
Peter Andrews
John Arthurs
Laura Ahlberg
B
Susan Brown
Wendy Barker
C
Mike Crow
…
Is this possible? I have used chunk for splitting collections before, but not done anything like this where the splits are based on the content of the collection itself.
Any help or pointers gratefully appreciated!