1
1
1katerina92019-04-04 12:32:54
1C-Bitrix
1katerina9, 2019-04-04 12:32:54

How to display all sections on all pages?

How to display all sections in 1c Bitrix through the component in such a directory as in the picture? and so that they remain when navigating through the section
5ca5ccb130fbc364716974.png
. If you use the bitrix:catalog.section.list component, then when navigating, it shows only the title of the active section.
I know that you can display sections through the menu, but so far this does not suit me.
The question was raised here How to display the full list of the catalog in Bitrix on all pages? but I never found those lines.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Proger, 2019-04-04
@freekirill

to display sections in Bitrix, you can use
1 bitrix:catalog.section.list - component
2 Display sections through bitrix:menu
3) use api

CIBlockResult
CIBlockSection::GetList(
    array arOrder = Array("SORT"=>"ASC"),
    array arFilter = Array(),
    bool bIncCnt = false,
    array Select = Array(),
    array NavStartParams = false
);

A
Anton, 2019-04-04
@anton99zel

<ul>
<?
\Bitrix\Main\Loader::IncludeModule('iblock');
$arFilter = [
  'IBLOCK_ID' => 5
];
$arOrder = [
  'LEFT_MARGIN' => 'ASC'
];
$arSelect = [
  'ID',
  'LEFT_MARGIN',
  'DEPTH_LEVEL',
  'NAME'
];
$resSections = \CIBlockSection::GetList($arOrder, $arFilter, false, $arSelect);
while( $arSection = $resSections->fetch() )
{?><li><?=$arSection[NAME]?></li><?}
?>
</ul>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question