Answer the question
In order to leave comments, you need to log in
How to get id of all elements with binding to elements in properties?
There is an infoblock "one" with a group of elements and an infoblock "two" with a group of elements.
The elements of block 1 have the "binding to elements" property, with the help of which the elements of block 2 are attached to the elements of block 1 as properties.
Everything is fine, as long as we need to get the properties of the elements of block 2 in the element template, this can be done through the parameter
$arResult[PROPERTIES][СИМВОЛЬНЫЙКОДСВОЙСТВА][VALUE]
Answer the question
In order to leave comments, you need to log in
Thriller pancake)
Getlist treats this, see the parameters.
In general, the connection of tables in both directions without a layer in any database is a bad idea.
If the old way is like this:
$propertyBrandValue = 'НАЗВАНИЕ';
$iBlockId_1 = 9;
$res = CIBlockElement::GetList(array(),
array(
'IBLOCK_ID' => $iBlockId_1,
'=PROPERTY_C_BRANDS.NAME' => $propertyBrandValue
),
false,
array('nTopCount' => 10),
array('ID', 'IBLOCK_ID', 'NAME')
);
while($el = $res->GetNext()) {
\Bitrix\Main\Diag\Debug::dump($el);
}
=PROPERTY_C_BRANDS.NAME
- here you change NAME to a field or property. Description of the method and filtering here: Bitrix documentationDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question