Answer the question
In order to leave comments, you need to log in
How to link sections of two different infoblocks of the same type to each other in Bitrix?
Please tell me there is a type of infoblock Services, it has two infoblocks - one is service cards (price, etc.), the second is questions regarding these services. each infoblock contains sections that correspond to each other, i.e. service 1 (first infoblock) - questions about 1 service (second infoblock). I need to load on the page when clicking on the corresponding tab with the name of the service - the service card from the first infoblock and below the questions from the second infoblock. I load the card by the section id from the first infoblock, how to link the sections of the second infoblock so that I can somehow display them synchronously with the service cards?
Answer the question
In order to leave comments, you need to log in
I see 2 ways. both through an additional request in result_modifier -
1 - an additional request is made to the second infoblock with a search by the name of the current service. if each question is a separate element, and the service is a section, you select a section and select elements based on it. you do not need to create additional fields and fill them in all the time, but the method is bad because you need to fill in the same names. extra point and no longer works.
2 - (I like it more) - for elements and sections, you can make binding properties to elements or sections of the infoblock. you create a service in one infoblock, in another, and then link it. you will have the id of the element/section in the properties of the elements, depending on what you need. and also select a section/elements from another infoblock using it. you need to make sure that the bindings are accurately affixed. And if you suddenly deleted questions - bind again. but this way is better.
in general terms like this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question