Answer the question
In order to leave comments, you need to log in
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
. 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
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
);
<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 questionAsk a Question
731 491 924 answers to any question