85 Posts
kromoadv
8 years ago
6
Topic

Hi Sebloders,

i have a site with a bunch of users and i'd like to display them in a list type ordered by letters.

For example:

A

   - A user 1

   - A user 2

   - A user 3

B

   - B user 1

   - B user 2

   - B user 3

C

   - C user 1

   - C user 2

   - C user 3

D

   - D user 1

   - D user 2

   - D user 3

and so on...

Any suggestion?

Thx in advance

      Get a VIP membership
      1283 Posts
      Bucklash
      8 years ago
      3
      Level 1

      Hi

      My suggestion and just an overview :)

      1

      Create a list of the alphabet in db either as free table or a list of tags  etc.

      Store in each entry A, then B etc 

      2

      Create a search & list of these letters

      3

      In the search view add a search & list field

      This will be passed the value from the list item ie A, or B

      The Search & list field will lists all users that begin with the passed value

      That will require some funky sql query...

      create-a-dynamic-list-within-a-list-item

      85 Posts
      kromoadv
      8 years ago
      2
      Level 2

      Hi Bucklash,

      thx for your reply ; )

      Do you think i can do it in a simle position override with a query for evry single letter?

      Regards

      1283 Posts
      Bucklash
      8 years ago
      1
      Level 3

      Hi

      I guess so....

      Interested to see how you get on .... make sure you post it :)

      85 Posts
      kromoadv
      8 years ago
      0
      Level 4

      Hi Bucklash,

      i think i'll try to store the letters in an array and then i'll make a query in a foreach statement.

      I'll post it as soon as i will have the solition.

      Regards

      Luca

      4229 Posts
      Kadministrator
      8 years ago
      1
      Level 1

      If you only care about ordering itself, put user name field ( or surname or whatever you would like it to be ordered by) in the order tab of seach&list. If you also need a, b ,c etc letters you can do as Bucklash suggested.

      85 Posts
      kromoadv
      8 years ago
      0
      Level 2

      Hi Klas,

      thank you.

      Yes, i need a, b, c etc letters

      Get a VIP membership