From 10a29346a290fcf5db9a209d2625d54c458cd353 Mon Sep 17 00:00:00 2001 From: merelendor Date: Wed, 8 Dec 2021 15:11:31 +0300 Subject: [PATCH] update for general-terms folder --- .about.menu_ext.php | 48 +++++++++++++++++++ .htaccess | 9 +++- about/.left.menu_ext.php | 10 +--- general-terms/.section.php | 3 -- general-terms/index.php | 17 ------- .../templates/.default/template.php | 4 +- local/templates/404/footer.php | 2 +- local/templates/evolution/footer.php | 2 +- urlrewrite.php | 14 ++++-- 9 files changed, 73 insertions(+), 36 deletions(-) create mode 100644 .about.menu_ext.php delete mode 100644 general-terms/.section.php delete mode 100644 general-terms/index.php diff --git a/.about.menu_ext.php b/.about.menu_ext.php new file mode 100644 index 0000000..4eb7273 --- /dev/null +++ b/.about.menu_ext.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/.htaccess b/.htaccess index 75cfd5e..172c2a5 100644 --- a/.htaccess +++ b/.htaccess @@ -204,7 +204,14 @@ ErrorDocument 404 /404.php RewriteCond %{QUERY_STRING} ^ID=1192$ [NC] RewriteRule ^offer-detail/$ https://evoleasing.ru/special/harley-davidson-finance/fox-trailer-lizing/? [R=301,NE,NC,L] - + +RewriteCond %{REQUEST_URI} !\? +RewriteCond %{REQUEST_URI} !\& +RewriteCond %{REQUEST_URI} !\= +RewriteCond %{REQUEST_URI} !\. +RewriteCond %{REQUEST_URI} !\/$ +RewriteRule ^(.*[^\/])$ /$1/ [R=301,L] + RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-d diff --git a/about/.left.menu_ext.php b/about/.left.menu_ext.php index 5394a46..4eb7273 100644 --- a/about/.left.menu_ext.php +++ b/about/.left.menu_ext.php @@ -30,7 +30,7 @@ $aMenuLinks = Array( ), Array( "Прочее", - "/about/rules/", + "/general-terms/", Array(), Array(), "" @@ -43,12 +43,6 @@ $aMenuLinks = Array( Array(), "" ), - Array( - "Прочее", - "/about/additional/", - Array(), - Array(), - "" - )*/ + */ ); ?> \ No newline at end of file diff --git a/general-terms/.section.php b/general-terms/.section.php deleted file mode 100644 index 23d8c11..0000000 --- a/general-terms/.section.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/general-terms/index.php b/general-terms/index.php deleted file mode 100644 index a949927..0000000 --- a/general-terms/index.php +++ /dev/null @@ -1,17 +0,0 @@ -SetTitle("Эволюция автолизинга: Общие условия договора лизинга"); -?> -IncludeComponent( - "evolution:about.rules", - "", - Array() -); -?> -IncludeComponent( - "evolution:form.leasing", - "", -Array() -);?> - \ No newline at end of file diff --git a/local/components/evolution/about.rules/templates/.default/template.php b/local/components/evolution/about.rules/templates/.default/template.php index 2586c91..02d3d14 100644 --- a/local/components/evolution/about.rules/templates/.default/template.php +++ b/local/components/evolution/about.rules/templates/.default/template.php @@ -22,7 +22,7 @@ $this->setFrameMode(true);
IncludeComponent("bitrix:menu", "evolution.left.menu", Array( "ALLOW_MULTI_SELECT" => "N", // Разрешить несколько активных пунктов одновременно - "CHILD_MENU_TYPE" => "left", // Тип меню для остальных уровней + "CHILD_MENU_TYPE" => "about", // Тип меню для остальных уровней "DELAY" => "N", // Откладывать выполнение шаблона меню "MAX_LEVEL" => "1", // Уровень вложенности меню "MENU_CACHE_GET_VARS" => array( // Значимые переменные запроса @@ -31,7 +31,7 @@ $this->setFrameMode(true); "MENU_CACHE_TIME" => "3600", // Время кеширования (сек.) "MENU_CACHE_TYPE" => "N", // Тип кеширования "MENU_CACHE_USE_GROUPS" => "Y", // Учитывать права доступа - "ROOT_MENU_TYPE" => "left", // Тип меню для первого уровня + "ROOT_MENU_TYPE" => "about", // Тип меню для первого уровня "USE_EXT" => "Y", // Подключать файлы с именами вида .тип_меню.menu_ext.php ), false diff --git a/local/templates/404/footer.php b/local/templates/404/footer.php index 1b1157c..57bd272 100644 --- a/local/templates/404/footer.php +++ b/local/templates/404/footer.php @@ -58,7 +58,7 @@ Обработка персональных данных
- Общие условия договора лизинга + Общие условия договора лизинга
diff --git a/local/templates/evolution/footer.php b/local/templates/evolution/footer.php index 1b1157c..57bd272 100644 --- a/local/templates/evolution/footer.php +++ b/local/templates/evolution/footer.php @@ -58,7 +58,7 @@ Обработка персональных данных
- Общие условия договора лизинга + Общие условия договора лизинга
diff --git a/urlrewrite.php b/urlrewrite.php index 67f4cb7..fcd902d 100644 --- a/urlrewrite.php +++ b/urlrewrite.php @@ -161,19 +161,27 @@ $arUrlRewrite=array ( 'SORT' => 70, ), 21 => + array ( + 'CONDITION' => '#^/general-terms/\\??.*$#', + 'RULE' => '', + 'ID' => '', + 'PATH' => '/about/rules/index.php', + 'SORT' => 80, + ), + 22 => array ( 'CONDITION' => '#^\\/?\\/mobileapp/jn\\/(.*)\\/.*#', 'RULE' => 'componentName=$1', 'ID' => NULL, 'PATH' => '/bitrix/services/mobileapp/jn.php', - 'SORT' => 80, + 'SORT' => 90, ), - 22 => + 23 => array ( 'CONDITION' => '#^/rest/#', 'RULE' => '', 'ID' => NULL, 'PATH' => '/bitrix/services/rest/index.php', - 'SORT' => 90, + 'SORT' => 100, ), );