R
R
Radiss2019-03-03 02:36:30
1C-Bitrix
Radiss, 2019-03-03 02:36:30

How to set directory url in menu?

There is an infoblock type: "Product catalog" and there is a "Menu" component.
Infoblock: "Catalog of goods"
If you type url
http://madeirrf.beget.tech/сatalog/kurta-kurti/ - then 404
Or go to any category of the catalog from the menu - the same thing
But if you go from the madeirrf.beget cache. tech/%D1%81atalog/?clear_cache=Y then the category opens
Also, there are transitions between categories from this page to different sections of the catalog (not from the menu)
And at the same time, the address at the beginning or when copying appears like this: madeirrf.beget. tech/%D1%81atalog/kurta-kurti
but looks like this in the line http://madeirrf.beget.tech/catalog/kurta-kurti/- 404
Header directory template.

spoiler
<!--<?//if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<!--
Author: W3layouts
Author URL: http://w3layouts.com
License: Creative Commons Attribution 3.0 Unported
License URL: http://creativecommons.org/licenses/by/3.0/
-->
<!DOCTYPE html>
<html>
<head>
     <?php
    use Bitrix\Main\Page\Asset;
    $APPLICATION->ShowHead();
    ?>
    <!--объект апликейшн и метот title и вызываем метод ShowTitle-->
<title><?php $APPLICATION->ShowTitle(); ?></title>

<?php Asset::getInstance()->addCss(DEFAULT_TEMPLATE_PATH."/css/bootstrap.css");
      Asset::getInstance()->addCss(DEFAULT_TEMPLATE_PATH."/css/style.css");
      Asset::getInstance()->addCss(DEFAULT_TEMPLATE_PATH."/css/nav.css");
      Asset::getInstance()->addCss(DEFAULT_TEMPLATE_PATH."/css/form.css");
      Asset::getInstance() ->addJs(DEFAULT_TEMPLATE_PATH . "/js/jquery.min.js");
      Asset::getInstance() ->addJs(DEFAULT_TEMPLATE_PATH . "/js/hover_pack.js");
      Asset::getInstance() ->addJs(DEFAULT_TEMPLATE_PATH . "/js/jquery.easydropdown.js");
      Asset::getInstance() ->addJs(DEFAULT_TEMPLATE_PATH . "js/scripts.js");
      
      /*для подк.всего прочего*/
      Asset::getInstance()->addString('<meta name="viewport" content="width=device-width, initial-scale=1">');
       Asset::getInstance()->addString("<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>");
?>	

 <script type="text/javascript">
    jQuery(document).ready(function($) {
      $(".scroll").click(function(event){		
        event.preventDefault();
        $('html,body').animate({scrollTop:$(this.hash).offset().top},1200);
      });
    });
  </script>

</head>
<body>
    <!--админ панель-->
        <div id="panel"><?php $APPLICATION->ShowPanel();?></div>
    
    
  <!-- header-section-starts -->
  <div class="c-header" id="home">
    <div class="top-header">
      <div class="container">
      <div class="logo">
          	<a href="/"><img src="<?=DEFAULT_TEMPLATE_PATH;?>/images/logo.png" alt="" /></a>
        </div>
        <div class="header-top-right">
        <!-- start search-->
            <div class="search-box">
              <div id="sb-search" class="sb-search">
              <form>
                <input class="sb-search-input" placeholder="Enter your search term..." type="search" name="search" id="search">
                <input class="sb-search-submit" type="submit" value="">
                <span class="sb-icon-search"> </span>
              </form>
            </div>
            </div>
          <!-- search-scripts -->
            <script src="<?=DEFAULT_TEMPLATE_PATH;?>/js/classie.js"></script>
            <script src="<?=DEFAULT_TEMPLATE_PATH;?>/js/uisearch.js"></script>
        <script>
              new UISearch( document.getElementById( 'sb-search' ) );
            </script>
          <!-- //search-scripts -->

          <a href="cart.html"><i class="cart"></i></a>
        </div>
         	<?$APPLICATION->IncludeComponent("bitrix:menu", "menu_catalog", Array(
                	"ALLOW_MULTI_SELECT" => "N",	// Разрешить несколько активных пунктов одновременно
                 	"CHILD_MENU_TYPE" => "left",	// Тип меню для остальных уровней
              	"DELAY" => "N",	// Откладывать выполнение шаблона меню
              	"MAX_LEVEL" => "2",	// Уровень вложенности меню
              	"MENU_CACHE_GET_VARS" => "",	// Значимые переменные запроса
              	"MENU_CACHE_TIME" => "3600",	// Время кеширования (сек.)
              	"MENU_CACHE_TYPE" => "N",	// Тип кеширования
              	"MENU_CACHE_USE_GROUPS" => "Y",	// Учитывать права доступа
              	"ROOT_MENU_TYPE" => "main",	// Тип меню для первого уровня
              	"USE_EXT" => "Y",	// Подключать файлы с именами вида .тип_меню.menu_ext.php
              	"COMPONENT_TEMPLATE" => "horizontal_multilevel"
              
        	),
    	false
);?>
        
      
      </div>
    </div>
    </div>
    <!-- start Dresses-page -->
  <!-- content-section-starts -->
  <div class="container">

main.menu_ext.php (incl. in comp.)
spoiler
<?php

if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
global $APPLICATION; 
$aMenuLinksExt = $APPLICATION->IncludeComponent(
    "bitrix:menu.sections",
    "",
    Array(
        "IS_SEF" => "Y",
        "SEF_BASE_URL" => "/catalog/",
        "SECTION_PAGE_URL" => "#SECTION_CODE#/", /*адрес раздела меню/ "#SECTION_CODE_PATH#/"*/
        "DETAIL_PAGE_URL" => "#SECTION_CODE#/#ELEMENT_CODE", /*путь у товару конечному. полный путь  "#SECTION_CODE_PATH#/#ELEMENT_CODE",*/
        "IBLOCK_TYPE" => "catalog",  /*тип информац.блока  id  записан http://madeirrf.beget.tech/bitrix/admin/iblock_type_admin.php?lang=ru*/
        "IBLOCK_ID" => "4", /*id каталога товаров http://madeirrf.beget.tech/bitrix/admin/iblock_edit.php?type=catalog&lang=ru&ID=4&admin=Y*/
        "DEPTH_LEVEL" => "2", /*уровень вложенности*/
        "CACHE_TYPE" => "A", 
        "CACHE_TIME" => "3600" 
    )
);
$aMenuLinks = array_merge(, $aMenuLinksExt, $aMenuLinks); /*$aMenuLinks это .main.menu.php - статичный arr.
чтобы контакты были вконце надо поменять местами arr. ссылка на home добавл.в виде []*/
5c7b12e4c7862766810923.jpeg5c7b12ed6ae15941116588.jpeg5c7b155779fe3831332404.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gritsuk, 2019-03-03
@radiss

It seems to me that somewhere in the CNC settings: either the IB settings, or the settings of one of the components - in the word catalog , the first beech is Russian C

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question