A
A
Alexander Ivanov2016-03-01 17:10:58
1C-Bitrix
Alexander Ivanov, 2016-03-01 17:10:58

How to insert random sorting of news in Bitrix?

I tried to embed this sorting in different ways, but I embed it incorrectly.
RAND method description - dev.1c-bitrix.ru/api_help/iblock/classes/ciblockel...

<?$APPLICATION->IncludeComponent(
          "bitrix:news.list",
          "",
          Array(
            "FIELD_CODE" => Array("ID"),
            "IBLOCK_ID" => "[nomber_id]",
            "IBLOCK_TYPE" => "news",
            "NEWS_COUNT" => "6",
            "PROPERTY_CODE" => Array("DESCRIPTION"),
            "SORT_ORDER1" => Array("RAND" => "ASC")// попытки встр.
            "RAND" => "ASC"// попытки встр.
            "SORT_ORDER1" => "RAND"// попытки встр.
          )
        );?>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Ivanov, 2016-03-01
@cimonlebedev

That's the only way it worked

"SORT_BY1" => "RAND",
    "SORT_ORDER1" => "RAND",
    "SORT_BY2" => "RAND",
    "SORT_ORDER2" => "RAND",

Y
Yuri Grinev, 2016-03-01
@linakun

Self-sufficient you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question