Goal:
Build an alphabetical list with anchor links at the start of every letter.
I’m trying to work through a conditional string where it loads in some code based off the first letter of that field data.
I’ve got a field called last_name to use for sorting purposes, but I’m stuck on how to pull this off.
The end result would be something like:
<a name="link" id="A"></a>
Adams, John
Arinder, John
Asbury, John
<a name="link" id="B"></a>
Bass, John
Bender, John
Birchfield, JohnI can get it to where it renders the anchor link with every entry. Where I’m stuck is that I only want to appear once before the first result for each letter.
Any thoughts?