Last active
November 23, 2015 18:31
-
-
Save zetrider/522edf88fcc94e854f63 to your computer and use it in GitHub Desktop.
Bitrix - настройка списка окна элементов, привязка к элементам для всех свойств инфоблоков
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CModule::IncludeModule("iblock"); | |
$arParams = array(); | |
$res = CIBlock::GetList(array(), array()); | |
while($arF = $res->Fetch()) | |
{ | |
$PROPS = CIBlock::GetProperties($arF['ID'], array('SORT'=>'ASC'), array('PROPERTY_TYPE' => 'E')); | |
while ($PROP = $PROPS->Fetch()) | |
{ | |
$arParams[] = array( | |
'd' => 'Y', | |
'c' => 'list', | |
'n' => "tbl_iblock_el_search".md5('PROP['.$PROP['ID'].']'), | |
'v' => array( | |
'columns' => 'ID,NAME', | |
'by' => 'name', | |
'order' => 'asc', | |
'page_size' => '20', | |
), | |
); | |
} | |
} | |
if(count($arParams)) | |
{ | |
CUserOptions::SetOptionsFromArray($arParams); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment