A
A
Alexer052020-02-13 08:40:15
1C-Bitrix
Alexer05, 2020-02-13 08:40:15

How to output elements through highloadblock.list with specified property?

Is it possible to display only those elements in bitrix:highloadblock.list that have "UF_ACTIVE" property set to "Y"?
I try to use the example below, but all the elements are still displayed

$filter = array('UF_ACTIVE' => 'Y');
$APPLICATION->IncludeComponent("bitrix:highloadblock.list", "slider_products", array("BLOCK_ID" => "2", "FILTER_NAME" => "filter"));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2020-02-13
@Alexer05

above write
global $filter;
or so declare the filter
$GLOBALS['filter'] = array('UF_ACTIVE' => 'Y');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question