V
V
Vladimir2017-07-28 09:01:28
1C-Bitrix
Vladimir, 2017-07-28 09:01:28

Why is the wrong EXT from the menu being picked up?

Good afternoon. A question.
I have a catalog menu on the main page of the site.

<?$APPLICATION->IncludeComponent(
  "bitrix:menu", 
  "main", 
  array(
    "ROOT_MENU_TYPE" => "catalog",
    "MAX_LEVEL" => "1",
    "CHILD_MENU_TYPE" => "",
    "USE_EXT" => "Y",
    "MENU_CACHE_TYPE" => "A",
    "MENU_CACHE_TIME" => "604800",
    "MENU_CACHE_USE_GROUPS" => "Y",
    "MENU_CACHE_GET_VARS" => array(
    ),
    "SHOW_EMPTY" => "Y",
    "DELAY" => "N",
    "ALLOW_MULTI_SELECT" => "N"
  ),
  false
);?>

Its ext is called like .catalog.menu_ext
<?
    global $APPLICATION;
    $aMenuLinksExt=$APPLICATION->IncludeComponent("bitrix:menu.sections", "", array(
  "IS_SEF" => "Y",
  "SEF_BASE_URL" => SITE_DIR,
  "SECTION_PAGE_URL" => "/catalog/#SECTION_CODE#/",
  "DETAIL_PAGE_URL" => "/catalog/#ELEMENT_CODE#.html",
  "IBLOCK_TYPE" => "catalog",
  "IBLOCK_ID" => "16",
  "DEPTH_LEVEL" => "3",
  "CACHE_TYPE" => "A",
  "CACHE_TIME" => "36000000"
  ),
  false,
  array(
  "HIDE_ICONS" => "N"
  )
);

$aMenuLinks = array_merge($aMenuLinksExt, $aMenuLinks);
?>

There is also a page on the site that uses a different template, but also a menu. The only difference is the URL.
Here is the menu of this second page
<?$APPLICATION->IncludeComponent(
  "bitrix:menu", 
  "main", 
  array(
    "ROOT_MENU_TYPE" => "mobile",
    "MAX_LEVEL" => "1",
    "CHILD_MENU_TYPE" => "mobile",
    "USE_EXT" => "Y",
    "MENU_CACHE_TYPE" => "N",
    "MENU_CACHE_TIME" => "604800",
    "MENU_CACHE_USE_GROUPS" => "Y",
    "MENU_CACHE_GET_VARS" => array(
    ),
    "SHOW_EMPTY" => "Y",
    "DELAY" => "N",
    "ALLOW_MULTI_SELECT" => "N"
  ),
  false
);?>

Its ext is called .mobile.menu_ext.php
<?
    global $APPLICATION;
    $aMenuLinksExt=$APPLICATION->IncludeComponent("bitrix:menu.sections", "", array(
  //"IS_SEF" => "Y",
  //"SEF_BASE_URL" => SITE_DIR."mobile/menu/",
  "ID"=>$_REQUEST["SECTION_ID"],
  "SECTION_URL"=>"mobile/catalog/?SECTION_ID=#ID#",
  //"SECTION_PAGE_URL" => "/mobile/catalog/?SECTION_ID=#SECTION_ID#",
  "DETAIL_PAGE_URL" => "/mobile/catalog/#ELEMENT_ID#.html",
  "IBLOCK_TYPE" => "catalog",
  "IBLOCK_ID" => "16",
  "DEPTH_LEVEL" => "3",
  "CACHE_TYPE" => "N",
  //"CACHE_TIME" => "36000000"
  ),
  false,
  array(
  "HIDE_ICONS" => "N"
  )
);

$aMenuLinks = array_merge($aMenuLinksExt, $aMenuLinks);
?>

The problem is that when I click reset cache on the main page my mobile menu is picked up. When I go to the directory with the mobile menu, I click reset the cache, the main menu is picked up. Why so and what to do?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question