ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

List Help

January 24, 2012 1:33pm

Subscribe [2]
  • #1 / Jan 24, 2012 1:33pm

    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, John

    I 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?

  • #2 / Jan 24, 2012 7:53pm

    e-man

    1816 posts

    Save yourself a lot of time and trouble and get Low’s Low Alphabet:
    http://gotolow.com/addons/low-alphabet
    It’ll do what you’re looking for and then some 😊
    I used if for this glossary if you need an example.

  • #3 / Jan 25, 2012 9:17am

    Perfecto!

    Thanks e-man.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases