Answer the question
In order to leave comments, you need to log in
How to randomize section output in catalog.section.list?
Hello connoisseurs!
How can I display 3 random sections marked with a custom field "New" in catalog.section.list?
I select by custom field:
$arFilter = array(
"ACTIVE" => "Y",
"GLOBAL_ACTIVE" => "Y",
"IBLOCK_ID" => $arParams["IBLOCK_ID"],
"CNT_ACTIVE" => "Y",
"!UF_NEW_COLLECTION" => 0, // Пользовательское поле "Новинка"
);
$arNavStartParams = Array("nTopCount" => 3);
$arOrder = Array("RAND" => "ASC");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question