A
A
Alexander Ivanov2016-04-06 15:31:11
1C-Bitrix
Alexander Ivanov, 2016-04-06 15:31:11

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
);?>

Already been here:
dev.1c-bitrix.ru/learning/course/?COURSE_ID=43&LES...
dev.1c-bitrix.ru/support/forum/forum6/topic38080
http://coder-diary.ru/programming/ bitrix-filtr/"
drawit.ru/blog/bitrix/filtatsiya-elementov-po-znac...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2016-04-06
@cimonlebedev

Array("ACTIVE" => "Y", "PROPERTY" => array('?TOMAIN' =>'1'));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question