We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1778
    • 659 Posts
    Hi there,
    I'm using the snippet "Peoples" to list users in a certain group. It works as expected...
    I use getPage to paginate the list and it also works fine...

    but ... Is there a way (existing add-on ?) to paginate the list alphabetically ?
    Thanks
      • 33976 ☆ A M B ☆
      • 571 Posts
      Hi anso,

      AFAIK, there isn't that kind of snippet publicly available. I guess you're good to code a wrapper (would be interesting for some sort of directory).

      A dirty workaround would be to use the where parameter
      Peoples? &where=`{"username:LIKE":"a%"}`
      


      (not tested, just a possibility)

      Hope that will help smiley
        • 1778
        • 659 Posts
        Hi Romain,
        thanks for answering... Yes I guess I'll have to code my own snippet/wrapper to achieve this ^_^... Probably write a snippet which allow to request any table and paginate the results alphabetically...
        I wrote something like that long time ago (it's very faaaaaaaar deep in my brain ... )...
        For tonight it's time to stop and have a bit of rest...
        Cheers
          • 19328
          • 433 Posts
          Sorry for digging up this old thread, but I like threads with copy and paste solutions wink
          So, to have an A to Z list of users, use this:

          [[!Peoples? &where=`{"User.username:LIKE":"A%"}`]]

          (Watch the 'User.', so not only 'username')

          Other user fields as follows:
          [[!Peoples? &where=`{"Profile.phone:LIKE":"06%"}`]]

          (Watch the 'Profile.')