Answer the question
In order to leave comments, you need to log in
How to set up a filter by property in Bitrix?
Checkbox property type.
Filters by main fields but not properties
$GLOBALS['arrFilter'] = Array("ACTIVE" => "Y", "PROPERTY_TOMAIN" => "1"); - does not display anything, but at least you can see that it affects something.
<?
//$GLOBALS['arrFilter'] = Array("ACTIVE" => "Y", "PROPERTY_TOMAIN" => "1");
//$GLOBALS['arrFilter'] = Array("PROPERTY_TOMAIN_VALUE"=>"Y");
$GLOBALS['arrFilter'] = array('PROPERTY_TOMAIN_VALUE' => 'Y');
?>
<?$APPLICATION->IncludeComponent(
"bitrix:news.list",
"main-news",
array(...
"PROPERTY_CODE" => array(
...
1 => "TOMAIN",
...
),
),
false
);?>
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