A
A
Anastasia Panfilova2017-03-27 15:43:54
1C-Bitrix
Anastasia Panfilova, 2017-03-27 15:43:54

How to sort infoblock elements?

The bottom line is that I have an "Events" infoblock and I need to sort its elements "by proximity" to the current date, i.e. the elements closest to the current date go first, and further and further, future scheduled events.
And I have no idea how to sort them in this way ..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2017-03-28
@Rema1ns

Anyway, there will be some proximity coefficient, for example, 10 events or 10 days, first display all these elements, and write the IDs of the displayed elements in the filter. Next, display the elements that go further by applying the filter. There will be 2 lists (or 2 components), as you prefer.
Well, add to the filter that you need to display elements from such and such a date (For example, from the date of the first event, which is closest to the current day)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question