D
D
Diversia2019-07-31 20:45:16
1C-Bitrix
Diversia, 2019-07-31 20:45:16

How to display new elements from the bottom in Bitrix Highloadblock?

There are 10 items in the highload block. You need to output only 5 of them in the following order:
6
7
8
9
10
I.e. so that all new elements are at the bottom with a limit of 5, as messages are displayed in the chat. Please tell me how to do it.
If I do this:

$rsData = $entityDataClass::getList([
    "select" => [
        "ID",
    ],
    "order" => ["ID" => "DESC"],
    "limit" => 5
]);

while ($row = $rsData->Fetch())
{
    echo $row['ID'];
}

New elements are displayed on top, and if I change the sorting, then new ones are not visible.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2019-07-31
@cyber-jet

Standard Entity Operations - getList()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question