Answer the question
In order to leave comments, you need to log in
How to get a custom list type property in news.list?
In the news.list component call, I do this
"PROPERTY_CODE" => array(
0 => "POPULAR",//свойство типа список
1 => "ELEMENT_CODE",
2 => "",
),
[POPULAR] => Array
(
[ID] => 23
[TIMESTAMP_X] => 2018-06-26 13:41:43
[IBLOCK_ID] => 11
[NAME] => Выводить в "Популярные услуги"
[ACTIVE] => Y
[SORT] => 500
[CODE] => POPULAR
[DEFAULT_VALUE] =>
[PROPERTY_TYPE] => L
[ROW_COUNT] => 1
[COL_COUNT] => 30
[LIST_TYPE] => L
[MULTIPLE] => N
[XML_ID] =>
[FILE_TYPE] =>
[MULTIPLE_CNT] => 5
[TMP_ID] =>
[LINK_IBLOCK_ID] => 0
[WITH_DESCRIPTION] => N
[SEARCHABLE] => N
[FILTRABLE] => N
[IS_REQUIRED] => Y
[VERSION] => 1
[USER_TYPE] =>
[USER_TYPE_SETTINGS] =>
[HINT] =>
[PROPERTY_VALUE_ID] =>
[VALUE] =>
[DESCRIPTION] =>
[VALUE_ENUM] =>
[VALUE_XML_ID] =>
[VALUE_SORT] =>
[VALUE_ENUM_ID] =>
[~VALUE] =>
[~DESCRIPTION] =>
[~NAME] => Выводить в "Популярные услуги"
[~DEFAULT_VALUE] =>
)
Answer the question
In order to leave comments, you need to log in
Apparently this element is empty. Then the property will be displayed in the PROPERTIES array exactly as it looks on yours. Otherwise, VALUE will contain its value, and VALUE_XML_ID will contain its key:
[VALUE] => value
[DESCRIPTION] =>
[VALUE_ENUM] => value
[VALUE_XML_ID] => xml_id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question