K
K
kimqar_ver2020-09-20 11:19:49
1C-Bitrix
kimqar_ver, 2020-09-20 11:19:49

Catalog detail page url not working correctly?

I have the following code for a submenu dropdown with a directory:

<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */


$this->setFrameMode(true);
if (empty($arResult["ALL_ITEMS"]))
  return;

CUtil::InitJSCore();

if (file_exists($_SERVER["DOCUMENT_ROOT"].$this->GetFolder().'/themes/'.$arParams["MENU_THEME"].'/colors.css'))
  $APPLICATION->SetAdditionalCSS($this->GetFolder().'/themes/'.$arParams["MENU_THEME"].'/colors.css');

$menuBlockId = "catalog_menu_".$this->randString();
?>

<div class="container-xl pb-4 pt-4 d-flex justify-content-between align-items-center bx-top-nav bx-<?=$arParams["MENU_THEME"]?>"
  id="<?=$menuBlockId?>">
  <div class="logo__header">
    <a href="/"> <svg class="ico">
        <use xlink:href="<?=SITE_TEMPLATE_PATH?>/assets/img/sprite.svg#logo__company" alt="Лого"></use>
      </svg></a>
  </div>
  <nav class="mainMenu d-flex list-unstyled" id="cont_<?=$menuBlockId?>">
    <?foreach($arResult["MENU_STRUCTURE"] as $itemID => $arColumns):?>
    <!-- first level-->
    <?$existPictureDescColomn = ($arResult["ALL_ITEMS"][$itemID]["PARAMS"]["picture_src"] || $arResult["ALL_ITEMS"][$itemID]["PARAMS"]["description"]) ? true : false;?>
    <div class="mainMenu__item d-flex">
      <a class="mainMenu__title js-mainMenuItem" href="<?=$arResult["ALL_ITEMS"][$itemID]["LINK"]?>" <?if
        (is_array($arColumns) && count($arColumns)> 0 && $existPictureDescColomn):?>
        onmouseover="window.obj_<?=$menuBlockId?> && obj_<?=$menuBlockId?>.changeSectionPicure(this,
        '<?=$itemID?>');"
        <?endif?>
        >
        <?=$arResult["ALL_ITEMS"][$itemID]["TEXT"]?>
        <?if (is_array($arColumns) && count($arColumns) > 0):?>
        <?endif?>
      </a>
      <?if (is_array($arColumns) && count($arColumns) > 0):?>
      <div class="mainMenu__list js-mainMenuList submenu__inner">
        <div class="d-flex justify-content-between">
          <?foreach($arColumns as $key=>$arRow):?>
          <?foreach($arRow as $itemIdLevel_2=>$arLevel_3):?>
          <!-- second level-->
          <div class="mainMenu__item2">
            
            <a class="mainMenu__title2" href="<?=$arResult["ALL_ITEMS"][$itemIdLevel_2]["LINK"]?>"
              <?if($arResult["ALL_ITEMS"][$itemIdLevel_2]["SELECTED"]):?>class="bx-active"
              <?endif?>
              >
              <?=$arResult["ALL_ITEMS"][$itemIdLevel_2]["TEXT"]?>
            </a>
            <?if (is_array($arLevel_3) && count($arLevel_3) > 0):?>
            <div class="mainMenu__list2 d-flex flex-column">
              <?foreach($arLevel_3 as $itemIdLevel_3):?>
              <!-- third level-->

              <a class="mainMenu__item3" href="<?=$arResult["ALL_ITEMS"][$itemIdLevel_3]["LINK"]?>" <?if
                ($existPictureDescColomn):?>
                onmouseover="window.obj_<?=$menuBlockId?> &&
                obj_<?=$menuBlockId?>.changeSectionPicure(this, '<?=$itemIdLevel_3?>');return false;"
                <?endif?>
                data-picture="<?=$arResult["ALL_ITEMS"][$itemIdLevel_3]["PARAMS"]["picture_src"]?>"
                <?if($arResult["ALL_ITEMS"][$itemIdLevel_3]["SELECTED"]):?>class="bx-active"
                <?endif?>
                >
                <?=$arResult["ALL_ITEMS"][$itemIdLevel_3]["TEXT"]?>
              </a>

              <?endforeach;?>
            </div>
            <?endif?>
          </div>
          <?endforeach;?>

          <?endforeach;?>
        </div>
        <?if ($existPictureDescColomn):?>
        <div class="bx-nav-list-2-lvl bx-nav-catinfo dbg" data-role="desc-img-block">
          <a href="<?=$arResult["ALL_ITEMS"][$itemID]["LINK"]?>">
            <img src="<?=$arResult["ALL_ITEMS"][$itemID]["PARAMS"]["picture_src"]?>" alt="">
          </a>
          <p><?=$arResult["ALL_ITEMS"][$itemID]["PARAMS"]["description"]?></p>
        </div>
        <div class="bx-nav-catinfo-back"></div>
        <?endif?>
      </div>
      <?endif?>
    </div>
    <?endforeach;?>
    <div class="search-string">
      <input class="search__input invisible" id="title-search-input" type="text" name="header__search"
        placeholder="Поиск по каталогу...">
    </div>
  </nav>

  <div class="search__header">
    <svg class="ico__search">
      <use xlink:href="<?=SITE_TEMPLATE_PATH?>/assets/img/sprite.svg#search__header"></use>
    </svg>

  </div>
  <div class="header__contacts d-flex flex-column">
    <div class="phone__header d-flex flex-column justify-content-end">
      <a href="tel:8(918)326-86-34" class="mb-1">8 (918) 326-86-34</a>
      <a href="tel:8(800)600-31-95" class="mb-1">8 (800) 600-31-95</a>
    </div>
    <div class="btn-call__header d-flex justify-content-end">
      <a href="#win-call">Заказать звонок</a>
    </div>
  </div>
  <div class="logo__mobile">
    <a href="/">
      <img src="<?=SITE_TEMPLATE_PATH?>/assets/img/mobile__logo.svg">
    </a>
  </div>
  <div class="hamburger">


    <span class="hamburger-line"></span>
    <span class="hamburger-line"></span>
    <span class="hamburger-line"></span>


  </div>
  
  </div>
  <div class="menu__phone">

    <div class="search-string-mobile">
      <input class="search__input-mobile invisible" id="title-search-input" type="text" name="header__search"
        placeholder="Поиск по каталогу...">
    </div>
    <div class="search__header">
    <svg class="ico__search">
      <use xlink:href="<?=SITE_TEMPLATE_PATH?>/assets/img/sprite.svg#search__header"></use>
    </svg>

  </div>
    <ul>
      <li class="submenu-wrapper"><a href="/catalog/">Каталог</a></li>
      <li class="submenu-wrapper"><a href="/fabriki/">Фабрики</a></li>
      <li><a href="/dizayneram/">Дизайнерам</a></li>
      <li><a href="/novosti/">Журнал</a></li>
    </ul>

    <div class="header-phone-info">
      <div class="wrapper-block-content">
      <div class="address">
        <div class="title-text">
          Адрес
        </div>
        <div class="title-info">
          <div class="block-title">
            г. Краснодар, ул. Красных Партизан, 222
          </div>
          <div class="block-title margin-title">
            г. Сочи, ул. Несебрская, 1А<br />ТЦ «Гранд Марина», 2 этаж
          </div>
          <div class="map-header">

          <a href="#">Показать на карте</a>

          </div>
        </div>

      </div>
      <div class="phone">
        <div class="title-text">
          Телефон
        </div>
        <div class="title-info">
          <a href="te:8 (918) 326-86-34">8 (918) 326-86-34</a>
        </div>
      </div>
      <div class="mail">
        <div class="title-text">
          Почта
        </div>
        <div class="title-info">
          <a href="mailto:info@milanskiy-dom.com">info@milanskiy-dom.com</a>
        </div>
      </div>
    </div>
  </div>

The problem is that instead of a normal url like /catalog/gostynnie, it is written /company/gostynnie, tell me where the company comes from and how to change it to catalog? Thank you.

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