Answer the question
In order to leave comments, you need to log in
How to display the highload information of the 1c Bitrix block?
How to use the external code 1 (in the picture) to display the name 2
joxi.ru/E2pbyXcB8w9nrY
Answer the question
In order to leave comments, you need to log in
\Bitrix\Main\Loader::IncludeModule("highloadblock");
$xmlID = '21XlirMU'; //подставьте нужный вам внешний код
$tblName = 'years';
$select = ['UF_NAME']; // или как у вас поле называется
$filter = ['UF_XML_ID'=>$xmlID];
$limit = 1;
$hlblock = \Bitrix\Highloadblock\HighloadBlockTable::getList(
array("filter" => array('TABLE_NAME' => $tblName))
)->fetch();
$entity = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity($hlblock);
$Query = new \Bitrix\Main\Entity\Query($entity);
$Query->setSelect($select);
$Query->setFilter($filter);
$Query->setOrder([]);
$Query->setLimit($limit);
$result = $Query->exec();
$arResult = new \CDBResult($result);
CModule::IncludeModule("highloadblock");
$hldata = Bitrix\Highloadblock\HighloadBlockTable::getById($Highloadblock_id)->fetch();
$hlentity = Bitrix\Highloadblock\HighloadBlockTable::compileEntity($hldata);
$hlDataClass = $hldata["NAME"]."Table";
$result = $hlDataClass::getList(array(
"select" => array("UF_NAME"),
"order" => array(),
"filter" => array("UF_XML_ID"=>$xmlID),
));
while($res = $result->fetch())
{
$tital[] = $res["UF_NAME"];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question