Can I bespoke order collection elements on a dynamic page?

I have a repeater showing two estate agents, referenced to a collection on one Dynamic page containing lots of ‘items’ (different properties).

Currently the agents are listed on each live item page, alphabetically’ by agent first name. So ideally, I’d like to be able to choose the order the two agents are shown, for each property on this template. Is this possible and would I need to add some code?

See screenshots. I added Max then John in the CMS, however page obviously displays this A-Z on the repeater, so John first, then Max. Ideally the first one added on the CMS table is the first one displayed.

Hopefully code is not required, however If code is required, would anyone be kind enough to give me a steer on the code please?

Many thanks in advance.

Al

You could store another column of numbers that represent the sort order and then sort on that column.

Thanks Anthony, however that wouldnt work as there are multiple permutations of pairings and theres only one dynamic page. Any other solution Im all ears? Thansk for your input. Al

Not sure why Anthony’S solution-suggestion do not fir your expectations.

By adding a new COLUMN into your DATABASE (for example) called → INDEX <—, you would be able to set to each of your AGENTS a specific INDEX-ID.

  1. Max → 001
  2. Tom → 002
  3. Alice → 003
  4. and so on…

Now you can sort by → INDEX —> DESCENDING OR ASCENDING