Answer the question
In order to leave comments, you need to log in
How to display XML_ID properties of list type in Bitrix?
Hello!
The infoblock has a property of the list type. It has several meanings. prntscr.com/iirxcs
Here is the code to display the value
<?
CModule::IncludeModule("iblock");
$iblock_id = 31;
$return_str = "";
$arSelect = Array(
"ID",
"NAME",
"PROPERTY_ATT_CMP_PODDOMEN",
"PROPERTY_ATT_CMP_SERV",
"PROPERTY_ATT_CMP_TYPE",
"PROPERTY_ATT_CMP_ADV"
);
$arFilter = Array( "IBLOCK_ID"=>$iblock_id, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y" );
$res = CIBlockElement::GetList(Array("SORT"=>"ASC"), $arFilter, false, false, $arSelect);
while($ob = $res->GetNextElement()) {
$arFields = $ob->GetFields();
$return_str .= $arFields["PROPERTY_ATT_CMP_PODDOMEN_VALUE"] . "<hr>";
$return_str .= htmlspecialchars_decode($arFields["PROPERTY_ATT_CMP_SERV_VALUE"]["TEXT"]) . "<hr>";
$return_str .= htmlspecialchars_decode($arFields["PROPERTY_ATT_CMP_TYPE_VALUE"]["TEXT"]) . "<hr>";
$return_str .= htmlspecialchars_decode($arFields["PROPERTY_ATT_CMP_ADV_VALUE"]["TEXT"]) . "<hr>";
}
echo $return_str;
?>
Answer the question
In order to leave comments, you need to log in
Using CIBlockElement::GetList will not work. Take advantage of this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question