Answer the question
In order to leave comments, you need to log in
How to get an array of sections (sections) to which an infoblock belongs (an element of an infoblock belongs to several sections/sections) in the news list template?
Next situation.
There is an information block. Sections (sections) are created in its root, in this case 4.
Infoblock elements are created in these sections. Further, these infoblocks are assigned to several sections (sections). I checked - the element of the infoblock is indeed now placed in several necessary folders (sections / sections).
The elements of this infoblock must be displayed in the news list, and it is required to get all the IBLOCK_SECTION_ID values, and now I only display 1 Id of the element (presumably with the lowest index or maybe by SORT - did not check).
How can I get all the IBLOCK_SECTION_IDs that an infoblock element belongs to?
The most standard solution is desirable. Maybe when calling the component, you need to add some kind of setting?
Screenshots on the issue:
Answer the question
In order to leave comments, you need to log in
I just found this thing CIBlockElement::GetElementGroups, but I haven't figured out whether it works or not yet.
The question about setting up the news list component is still relevant. That is, is it possible to pass parameters to the component in such a way that without additional requests in result_modifier.php it can be dispensed with.
If there are sections, then it is better to use a complex catalog, where you can easily include news list instead of catalog-section.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question