Answer the question
In order to leave comments, you need to log in
How to display infoblock sections and a list of elements inside?
You should get a structure of three levels:
website/shops/shop sections/list of elements inside the section
in the admin panel, it looks like this:
In the shops there will be sections with tiles, by clicking on the section - a list of elements (regular pictures), everything is simple.
I have tried using various components to do this. With the help of news and catalog in various combinations. There are problems either with CNC and nesting, or with the bulkiness of the components. The closest was the catalog component. But it's too big for such a simple thing, I haven't been able to get all the extra stuff out of it.
Answer the question
In order to leave comments, you need to log in
infoblock sections: https://dev.1c-bitrix.ru/api_help/iblock/classes/c...
list of elements: https://dev.1c-bitrix.ru/api_help/iblock/classes/c...
An example of displaying a list of infoblock sections by ID.
Instead of SECTION_ID, you can use the infoblock ID, i.e. IBLOCK_ID or subsection ID of the infoblock section.
<ul id="liva">
<?$filter_7 = array('SECTION_ID'=>"34", 'ACTIVE'=>'Y');
$db_list_id7 = CIBlockSection::GetList(array(), $filter_7, true, Array("UF_DATE"));
while ($arSect = $db_list_id7->GetNext()){
$arSect["photo"] = CFile::GetPath($arSect["PICTURE"]);
?>
<li id="liver">
<a href="/<?=$arSect["CODE"]?>">
<?=$arSect["NAME"]?>
</a>
</li>
<? } ?>
</ul>
<?$filter_7 = array('SECTION_ID'=>"34", 'ACTIVE'=>'Y');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question