Answer the question
In order to leave comments, you need to log in
How to organize the output of goods from the infoblock to the menu?
There is a menu based on ext. I bring there categories and subcategories, as well as pictures of categories. When you hover over a subcategory, you need to get a list of the goods and pictures lying in them. It remains only to do this, but the products themselves are not available in the template, i.e. they are not in the array.
I'm a Junior only in Bitrix, so I'm asking for help. Here is the ext.php file, almost everything is organized in it, only a selection of goods remains. If anyone knows how to add products to the array, where to dig, unsubscribe
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
global $APPLICATION;
$aMenuLinksExt = array();
if(CModule::IncludeModule('iblock'))
{
$arFilter = array(
"TYPE" => "catalog",
"SITE_ID" => SITE_ID,
);
$dbIBlock = CIBlock::GetList(array('SORT' => 'ASC', 'ID' => 'ASC'), $arFilter);
$dbIBlock = new CIBlockResult($dbIBlock);
if ($arIBlock = $dbIBlock->GetNext())
{
if(defined("BX_COMP_MANAGED_CACHE"))
$GLOBALS["CACHE_MANAGER"]->RegisterTag("iblock_id_".$arIBlock["ID"]);
if($arIBlock["ACTIVE"] == "Y")
{
$aMenuLinksExt = $APPLICATION->IncludeComponent("bitrix:menu.sections", "", array(
"IS_SEF" => "Y",
"SEF_BASE_URL" => "",
"SECTION_PAGE_URL" => $arIBlock['SECTION_PAGE_URL'],
"DETAIL_PAGE_URL" => $arIBlock['DETAIL_PAGE_URL'],
"IBLOCK_TYPE" => $arIBlock['IBLOCK_TYPE_ID'],
"IBLOCK_ID" => $arIBlock['ID'],
"DEPTH_LEVEL" => "3",
"CACHE_TYPE" => "N",
), false, Array('HIDE_ICONS' => 'Y'));
}
}
if(defined("BX_COMP_MANAGED_CACHE"))
$GLOBALS["CACHE_MANAGER"]->RegisterTag("iblock_id_new");
}
$aMenuLinks = array_merge($aMenuLinks, $aMenuLinksExt);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question