M
M
Marty McFly2019-01-20 21:12:47
1C-Bitrix
Marty McFly, 2019-01-20 21:12:47

How to display elements from several infoblocks in catalog.top?

Hello! I can’t display products from several infoblocks in catalog.top, I tried this:
"IBLOCK_ID" => array(86, 87, 88),
and this

"IBLOCK_ID" => array(   
            0 => "86",
            1 => "87",
            2 => "88",
        ),

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Georgy Baruchyan, 2019-01-20
@alex_shevch

The catalog.top component has a non-multiple IBLOCK_ID property,
this is from the component parameters

IBLOCK_ID' => array(
      'PARENT' => 'BASE',
      'NAME' => GetMessage('IBLOCK_IBLOCK'),
      'TYPE' => 'LIST',
      'ADDITIONAL_VALUES' => 'Y',
      'VALUES' => $arIBlock,
      'REFRESH' => 'Y',
    ),

to be multiple, you need the MULTIPLE field with the value Y.
You can create a new component inherited from CatalogTopComponent
in the .parameters.php file specify the multiple for selecting IB.
You may have to play with the override of the checkIblock method, adding your own check logic there

I
Ilya, 2019-01-20
@jasper-blondin

Display several components (one infoblock in each).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question