Пошук по сайту
Результати пошуку за тегами 'меню сайта'.
Знайдено 4 результата
-
Всех приветствую! Появилась необходимость скрытия меню от индексации Яндексом на всех страницах категорий, кроме главной страницы. Есть вариант, как это сделать на php (архив прикрепил). Не очень понятно как это реализовать на menu.twig или через контроллер menu.php (вроде как выводить java через menu.twig не очень то и правильно). Можете подсказать, как это реализовать? menu.twig {% if (not modern_header_var) %} <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 menu_adapt"> <div class="top-menu"> <div id="top-menu" > <div class="nobackground"> <nav id="menu" class="navbar"> <div class="navbar-header"><span id="category" class="visible-xs">{{ text_category }}</span> <button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button> </div> <div class="collapse navbar-collapse navbar-ex1-collapse menu_adapt_coll"> <noindex><ul class="nav navbar-nav"> {% if (modern_ico_home != 1 and home != og_url) %} <li><a href="{{ base }}"><i class="fa fa-home fa_homemenu"></i></a></li> {% endif %} {% if (modern_ico_home_text != 1 and home != og_url) %} <li><a href="{{ base }}">{{ text_homel }}</i></a></li> {% endif %} {% if (modern_seevmenu_menu != 1) %} {% if (not modern_open_menu and home == og_url) %} <li class="dropdown hidev open"> {% else %} <li class="dropdown hidev"> {% endif %} <a class="with-child dropdown-toggle size" {% if (modern_link_menucatalog is not empty) %} href="{{ modern_link_menucatalog }}" {% endif %} data-hover="dropdown" data-delay="1" data-close-others="false"> {% if (modern_seevmenuico != 1) %} <i class="fa fa-bars"></i> {% endif %} {{ modern_vmenu_menu[language_id] }}<span class="fa fa-angle-down menu"></span></a> <ul class="dropdown-menu multi-level" role="menu"> {% for category in categories %} {% if (category['children']) %} <li class="dropdown-submenu li-drop close-button" > <a class="dr_menu" tabindex="-1" href="{{ category['href'] }}">{{ category['name'] }}<span class="arrowvertmenu"></span></a> <ul class="dropdown-menu2 column_width3"> {% if (category['image_main'] and modern_main_photos_menu != 1) %} <li class="col-lg-3 col-md-3 col-sm-4 li-main-foto"> <a href="{{ category['href'] }}"> <div class="main-foto-pos"><img class="main-foto-menu img-responsive" alt="{{ category['name'] }}" title="{{ category['name'] }}" src="{{ category['image_main'] }}"><span class="main-foto-back"></span></div> </a> </li> {% endif %} {% for child in category['children'] %} <li class="col-sm-4 mcol"> <span class = "hidden-xs">{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<a href="{{ child['href'] }}"><img class="vopmen img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a>{% endif %}</span> <div class="clearfix"></div> <a class="submenu_main" href="{{ child['href'] }}">{{ child['name'] }}</a> {% if (modern_3lv_menu != 1) %} {% if (child['children_lv3'] is defined and child['children_lv3']) %} {% set v = 0 %} {% set break = false %} {% for child_lv3 in child['children_lv3'] if not break %} <a class = "menuv_3lv " href="{{ child_lv3['href'] }}"> - {{ child_lv3['name'] }}</a> {% set v = v + 1 %} {% if (v >modern_countvmenulv - 1) %} <a class="menuv-allv" href="{{ child['href'] }}"><noindex>{{ modern_seeall_menu[language_id] }}</noindex></a> {% set break = true %} {% endif %} {% endfor %} {% endif %} {% endif %} </li> {% endfor %} </ul> </li> {% else %} <li class="v3hover li-drop close-button"><a class="dr_menu" href="{{ category['href'] }}">{{ category['name'] }}</a></li> {% endif %} {% endfor %} <li id="openclose"> <p class="dr_menu menu_slow">{{ text_modern_menu_open }}</p> </li> </ul> </li> {% endif %} </ul></noindex> <noindex><div class="menu_mob_plus"> <div class="hidem"> <ul class="nav navbar-nav"> {% for category in categories %} {% if (category['children']) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="{% if (category['category_id'] == category_id) %}{{ 'activetopmenu' }}{% endif %} dropdown static_pos"> <a class="with-child dropdown-toggle" href="{{ category['href'] }}" data-hover="dropdown" data-delay="1" data-close-others="false">{{ category['name'] }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu marg_top"> <div class="dropdown-inner children-category"> {% if (category['image_main'] and modern_main_photos_menu != 1) %} <ul class="col-lg-2 col-md-3 col-sm-3 li-main-foto"><li class="list_type"> <a href="{{ category['href'] }}"> <div class="main-foto-pos"><img class="image_main main-foto-menu img-responsive" alt="{{ category['name'] }}" title="{{ category['name'] }}" src="{{ category['image_main'] }}"><span class="main-foto-back"></span></div> </a> </li></ul> {% endif %} {% for child in category['children'] %} <ul class="list-unstyled {% if (category['image_main'] and modern_main_photos_menu != 1) %} col-lg-2 col-md-3 col-sm-3 clear_menu_cat_img {% else %} col-lg-2 col-md-3 col-sm-3 clear_menu_cat_noimg {% endif %}" > {% if (child['children_lv3'] is defined and child['children_lv3']) %} <li class="with-child" > <span class = "hidden-xs hidden-sm">{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<a href="{{ child['href'] }}"><img class="opacityhv img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a>{% endif %}</span> <a href="{{ child['href'] }}"><span class="style2lv">{{ child['name'] }}</span></a> </li> {% if (modern_3lv_menu != 1) %} {% set m = 0 %} {% set break = false %} {% for child_lv3 in child['children_lv3'] if not break %} <li class="children_lv3"><a href="{{ child_lv3['href'] }}"> - {{ child_lv3['name'] }}</a> {% set m = m + 1 %} {% if (m >modern_countvmenulv - 1) %} <a class="menuv-all" href="{{ child['href'] }}"><noindex>{{ modern_seeall_menu[language_id] }}</noindex></a> {% set break = true %} {% endif %} </li> {% endfor %} {% endif %} {% else %} <li>{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<span class = "hidden-xs hidden-sm"><a href="{{ child['href'] }}"><img class="opacityhv img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a></span>{% endif %}<a href="{{ child['href'] }}"><span class="style2lv">{{ child['name'] }}</span></a></li> {% endif %} </ul> {% endfor %} </div> </div> <div class="clearfix"></div> </li> {% else %} <li class="{% if (category['category_id'] == category_id) %}{{ 'activetopmenu' }}{% endif %}"><a href="{{ category['href'] }}">{{ category['name'] }}</a></li> {% endif %} {% endfor %} </ul> </div> <ul class="nav navbar-nav"> <!--add menu link--> {% if (modern_top_links8 ) %} {% for modern_top_link8 in modern_top_links8 %} <li> <a {% if (modern_top_link8['link_top'][language_id]) %} href="{{ modern_top_link8['link_top'][language_id] }}"{% endif %}>{% if (modern_top_link8['faicons_top']) %} <i class="{{ modern_top_link8['faicons_top'] }}"></i> {% endif %}{% if (modern_top_link8['title']) %}{{ modern_top_link8['title'][language_id] }}{% endif %}</a> </li> {% endfor %} {% endif %} <!--add menu link--> <!--other link--> {% if (modern_main_link_menu[language_id]) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown"> <a class="with-child dropdown-toggle" {% if (modern_main_link_href_menu[language_id] is not empty) %} href="{{ modern_main_link_href_menu[language_id] }}" {% else %} href="javascript:void(0)" {% endif %} data-hover="dropdown" data-delay="1" data-close-others="false">{{ modern_main_link_menu[language_id] }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner1 children-category"> <ul class="list-unstyled"> {% if (modern_top_links4 ) %} {% for modern_top_link4 in modern_top_links4 %} <li> <a {% if (modern_top_link4['link_top'][language_id]) %} href="{{ modern_top_link4['link_top'][language_id] }}"{% endif %} title="{{ modern_top_link4['title'][language_id] }}">{% if (modern_top_link4['faicons_top']) %} <i class="{{ modern_top_link4['faicons_top'] }}"></i>{% endif %}{% if (modern_top_link4['title']) %} {{ modern_top_link4['title'][language_id] }}{% endif %}</a> </li> {% endfor %} {% endif %} </ul> </div> </div> </li> {% endif %} <!--other link END--> <!--informations--> {% if (modern_info_menu != 1) %} {% if (informations) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown"> <a class="with-child dropdown-toggle" data-hover="dropdown" data-delay="1" data-close-others="false">{{ text_information }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner1 children-category"> <ul class="list-unstyled"> {% for information in informations %} <li><a href="{{ information['href'] }}">{{ information['title'] }}</a></li> {% endfor %} </ul> </div> </div> </li> {% endif %} {% endif %} <!--informations END--> <!--manufacturer--> {% if (modern_man_menu != 1) %} {% if (manufacturers) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown postion_fullmenu2"> <a class="with-child dropdown-toggle" href="{{ href_manufacturer }}" data-hover="dropdown" data-delay="1" data-close-others="false">{{ text_manufacturer }}<span class="fa fa-angle-down menu"></span></a> <div class="mancss dropdown-menu"> <div class="dropdown-inner children-category"> {% for manufacturer in manufacturers %} <ul class="list-unstyled" style="width: {{ 100/modern_menuman_column-1 }}%"> <li>{% if (modern_photos_menu_manuf != 1) %}<span class = "hidden-xs hidden-sm "><a class = "manufac-menu" href="{{ manufacturer['href'] }}"><img class="opacityhv manimgmen" src="{{ manufacturer['manufacturer_image'] }}" alt="{{ manufacturer['name'] }}" title="{{ manufacturer['name'] }}" ></a></span>{% endif %}<a class = "manufac-menu" href="{{ manufacturer['href'] }}">{{ manufacturer['name'] }}</a></li> </ul> {% endfor %} </div> </div> </li> {% endif %} {% endif %} <!--manufacturer END--> </ul> </div></noindex> </div> </nav> </div> </div> </div> </div> </div> <script> categories_count = {{ categories|length }}; modern_menu_category_lg = {{ modern_menu_category_lg }}; modern_menu_category_md = {{ modern_menu_category_md }}; modern_menu_category_sm = {{ modern_menu_category_sm }}; var q = 0; $(window).scroll(function(){if(window.innerWidth>991)if($(window).scrollTop()>{% if (not modern_open_menu) %}850{% else %}250{% endif %}){if(0==q){var a='<div class="top-header2"><div id="fix_scroll"><div class="container"><div class="row postion_fullmenu"><div id="logo" class="col-lg-1 col-md-1 col-sm-1 col-xs-1">';a+=$("div#logo").html(),a+='</div><div class="col-lg-9 col-md-9 col-sm-9 col-xs-9 postion_fullmenu2"><div class="top-menu">',a+=$("div.top-menu").html(),a+='</div></div><div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 cart">',a+=$("div.cart").html(),a+="</div></div></div></div></div>",$("body").append(a),$(".top-header2 .hidev").removeClass("open"),$(".top-header2 .hidev").addClass("slide"),q=1}}else 1==q&&($("*").remove(".top-header2"),q=0)}); $(window).resize(function() { if (window.innerWidth < 992) { $('*').remove('.top-header2'); } else if (window.innerWidth > 991 && window.innerWidth < 1200) { $('.dropdown-menu2').attr('class', 'dropdown-menu2 column_width2'); $('.mcol').attr('class', 'col-sm-4 mcol'); $('.dropdown-menu2 .clearfix').remove(); $(".dropdown-menu2 > li:nth-child(3n)").after('<li class="clearfix visible-sm visible-md visible-lg"></li>'); category_menu = {{ category_menu_sm }}; if (modern_menu_category_sm < categories_count) { $('#openclose').css('display', ''); } else { $('#openclose').css('display', 'none'); } } else if (window.innerWidth > 1199 && window.innerWidth < 1600) { $('.dropdown-menu2').attr('class', 'dropdown-menu2 column_width3'); $('.mcol').attr('class', 'col-sm-3 mcol'); $('.dropdown-menu2 .clearfix').remove(); $(".dropdown-menu2 > li:nth-child(4n)").after('<li class="clearfix visible-sm visible-md visible-lg"></li>'); category_menu = {{ category_menu_md }}; if (modern_menu_category_md < categories_count) { $('#openclose').css('display', ''); } else { $('#openclose').css('display', 'none'); } } else if (window.innerWidth > 1599) { $('.dropdown-menu2').attr('class', 'dropdown-menu2 column_width3'); $('.mcol').attr('class', 'col-sm-3 mcol'); $('.dropdown-menu2 .clearfix').remove(); $(".dropdown-menu2 > li:nth-child(4n)").after('<li class="clearfix visible-sm visible-md visible-lg"></li>'); category_menu = {{ category_menu_lg }}; if (modern_menu_category_lg < categories_count) { $('#openclose').css('display', ''); } else { $('#openclose').css('display', 'none'); } } }); $(window).resize(); $(".menu_slow").click(function () { if ($(".dropdown-menu > li.li-drop:nth-last-child(-n+"+ category_menu +")").is(":hidden")) { $(".dropdown-menu > li.li-drop:nth-last-child(-n+"+ category_menu +")").show("slow"); $('.li-drop').removeClass('close-button'); $('.li-drop').addClass('open-button'); $('.menu_slow').text('{{ text_modern_menu_close }}'); } else { $(".dropdown-menu > li.li-drop:nth-last-child(-n+"+ category_menu +")").hide("slow"); $('.li-drop').removeClass('open-button'); $('.li-drop').addClass('close-button'); $('.menu_slow').text('{{ text_modern_menu_open }}'); } return false; }); </script> {% else %} <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 postion_fullmenu2"> <div class="top-menu"> <div id="top-menu" > <div class="nobackground"> <nav id="menu" class="navbar"> <div class="navbar-header"><span id="category" class="visible-xs">{{ text_category }}</span> <button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button> </div> <div class="collapse navbar-collapse navbar-ex1-collapse menu_adapt_coll"> <ul class="nav navbar-nav"> {% if (modern_ico_home != 1) %} <li><a href="{{ base }}"><i class="fa fa-home fa_homemenu"></i></a></li> {% endif %} {% if (modern_ico_home_text != 1) %} <li><a href="{{ base }}">{{ text_homel }}</i></a></li> {% endif %} {% if (modern_seevmenu_menu != 1) %} <li class="dropdown hidev"> <a class="with-child dropdown-toggle size" {% if (modern_link_menucatalog is not empty) %} href="{{ modern_link_menucatalog }}" {% endif %} data-hover="dropdown" data-delay="1" data-close-others="false"> {% if (modern_seevmenuico != 1) %} <i class="fa fa-bars"></i> {% endif %} {{ modern_vmenu_menu[language_id] }}<span class="fa fa-angle-down menu"></span></a> <ul class="dropdown-menu multi-level" role="menu"> {% for category in categories %} {% if (category['children']) %} <li class="dropdown-submenu li-drop" > <a class="dr_menu" tabindex="-1" href="{{ category['href'] }}"> {{ category['name'] }} <span class="arrowvertmenu"></span></a> <ul class="dropdown-menu2"> {% if (category['image_main'] and modern_main_photos_menu != 1) %} <li class="col-lg-3 col-md-3 col-sm-4 li-main-foto"> <a href="{{ category['href'] }}"> <div class="main-foto-pos"><img class="main-foto-menu img-responsive" alt="{{ category['name'] }}" title="{{ category['name'] }}" src="{{ category['image_main'] }}"><span class="main-foto-back"></span></div> </a> </li> {% endif %} {% for child in category['children'] %} <li class="col-sm-4 mcol"> <span class = "hidden-xs">{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<a href="{{ child['href'] }}"><img class="vopmen img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a>{% endif %}</span> <div class="clearfix"></div> <a class="submenu_main" href="{{ child['href'] }}">{{ child['name'] }}</a> {% if (modern_3lv_menu != 1) %} {% if (child['children_lv3'] is defined and child['children_lv3']) %} {% set v = 0 %} {% set break = false %} {% for child_lv3 in child['children_lv3'] if not break %} <a class = "menuv_3lv " href="{{ child_lv3['href'] }}"> - {{ child_lv3['name'] }}</a> {% set v = v + 1 %} {% if (v >modern_countvmenulv - 1) %} <a class="menuv-allv" href="{{ child['href'] }}"><noindex>{{ modern_seeall_menu[language_id] }}</noindex></a> {% set break = true %} {% endif %} {% endfor %} {% endif %} {% endif %} </li> {% endfor %} </ul> </li> {% else %} <li class="v3hover li-drop"><a class="dr_menu" href="{{ category['href'] }}">{{ category['name'] }}</a></li> {% endif %} {% endfor %} </ul> </li> {% endif %} </ul> <div class="menu_mob_plus"> <div class="hidem"> <ul class="nav navbar-nav"> {% for category in categories %} {% if (category['children']) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="{% if (category['category_id'] == category_id) %}{{ 'activetopmenu' }}{% endif %} dropdown postion_fullmenu2"> <a class="with-child dropdown-toggle" href="{{ category['href'] }}" data-hover="dropdown" data-delay="1" data-close-others="false">{{ category['name'] }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner children-category"> {% if (category['image_main'] and modern_main_photos_menu != 1) %} <ul class="col-lg-2 col-md-3 col-sm-3 li-main-foto"><li class="list_type"> <a href="{{ category['href'] }}"> <div class="main-foto-pos"><img class="image_main main-foto-menu img-responsive" alt="{{ category['name'] }}" title="{{ category['name'] }}" src="{{ category['image_main'] }}"><span class="main-foto-back"></span></div> </a> </li></ul> {% endif %} {% for child in category['children'] %} <ul class="list-unstyled {% if (category['image_main'] and modern_main_photos_menu != 1) %} col-lg-2 col-md-3 col-sm-3 clear_menu_cat_img {% else %} col-lg-2 col-md-3 col-sm-3 clear_menu_cat_noimg {% endif %}" > {% if (child['children_lv3'] is defined and child['children_lv3']) %} <li class="with-child" > <span class = "hidden-xs hidden-sm">{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<a href="{{ child['href'] }}"><img class="opacityhv img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a>{% endif %}</span> <a href="{{ child['href'] }}"><span class="style2lv">{{ child['name'] }}</span></a> </li> {% if (modern_3lv_menu != 1) %} {% set m = 0 %} {% set break = false %} {% for child_lv3 in child['children_lv3'] if not break %} <li class="children_lv3"><a href="{{ child_lv3['href'] }}"> - {{ child_lv3['name'] }}</a> {% set m = m + 1 %} {% if (m >modern_countvmenulv - 1) %} <a class="menuv-all" href="{{ child['href'] }}"><noindex>{{ modern_seeall_menu[language_id] }}</noindex></a> {% set break = true %} {% endif %} </li> {% endfor %} {% endif %} {% else %} <li>{% if (modern_photos_menu != 1 and (child['image2'] is not empty)) %}<span class = "hidden-xs hidden-sm"><a href="{{ child['href'] }}"><img class="opacityhv img-responsive" src="{{ child['image2'] }}" alt="{{ child['name'] }}" title="{{ child['name'] }}" ></a></span>{% endif %}<a href="{{ child['href'] }}"><span class="style2lv">{{ child['name'] }}</span></a></li> {% endif %} </ul> {% endfor %} </div> </div> <div class="clearfix"></div> </li> {% else %} <li class="{% if (category['category_id'] == category_id) %}{{ 'activetopmenu' }}{% endif %}"><a href="{{ category['href'] }}">{{ category['name'] }}</a></li> {% endif %} {% endfor %} </ul> </div> <ul class="nav navbar-nav"> <!--add menu link--> {% if (modern_top_links8 ) %} {% for modern_top_link8 in modern_top_links8 %} <li> <a {% if (modern_top_link8['link_top'][language_id]) %} href="{{ modern_top_link8['link_top'][language_id] }}"{% endif %}>{% if (modern_top_link8['faicons_top']) %} <i class="{{ modern_top_link8['faicons_top'] }}"></i> {% endif %}{% if (modern_top_link8['title']) %}{{ modern_top_link8['title'][language_id] }}{% endif %}</a> </li> {% endfor %} {% endif %} <!--add menu link--> <!--other link--> {% if (modern_main_link_menu[language_id]) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown"> <a class="with-child dropdown-toggle" {% if (modern_main_link_href_menu[language_id] is not empty) %} href="{{ modern_main_link_href_menu[language_id] }}" {% else %} href="javascript:void(0)" {% endif %} data-hover="dropdown" data-delay="1" data-close-others="false">{{ modern_main_link_menu[language_id] }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner1 children-category"> <ul class="list-unstyled"> {% if (modern_top_links4 ) %} {% for modern_top_link4 in modern_top_links4 %} <li> <a {% if (modern_top_link4['link_top'][language_id]) %} href="{{ modern_top_link4['link_top'][language_id] }}"{% endif %} title="{{ modern_top_link4['title'][language_id] }}">{% if (modern_top_link4['faicons_top']) %} <i class="{{ modern_top_link4['faicons_top'] }}"></i>{% endif %}{% if (modern_top_link4['title']) %} {{ modern_top_link4['title'][language_id] }}{% endif %}</a> </li> {% endfor %} {% endif %} </ul> </div> </div> </li> {% endif %} <!--other link END--> <!--informations--> {% if (modern_info_menu != 1) %} {% if (informations) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown"> <a class="with-child dropdown-toggle" data-hover="dropdown" data-delay="1" data-close-others="false">{{ text_information }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner1 children-category"> <ul class="list-unstyled"> {% for information in informations %} <li><a href="{{ information['href'] }}">{{ information['title'] }}</a></li> {% endfor %} </ul> </div> </div> </li> {% endif %} {% endif %} <!--informations END--> <!--manufacturer--> {% if (modern_man_menu != 1) %} {% if (manufacturers) %} <li class="plus"><i class="fa fa-plus"></i><i class="fa fa-minus"></i></li> <li class="dropdown manuf_drop postion_fullmenu2"> <a class="with-child dropdown-toggle" href="{{ href_manufacturer }}" data-hover="dropdown" data-delay="1" data-close-others="false">{{ text_manufacturer }}<span class="fa fa-angle-down menu"></span></a> <div class="dropdown-menu"> <div class="dropdown-inner children-category"> {% for manufacturer in manufacturers %} <ul class="list-unstyled" style="width: {{ 100/modern_menuman_column-1 }}%"> <li><span class = "hidden-xs hidden-sm ">{% if (modern_photos_menu_manuf != 1) %}<a class = "manufac-menu" href="{{ manufacturer['href'] }}"><img class="opacityhv manimgmen" src="{{ manufacturer['manufacturer_image'] }}" alt="{{ manufacturer['name'] }}" title="{{ manufacturer['name'] }}" ></a></span>{% endif %}<a class = "manufac-menu" href="{{ manufacturer['href'] }}">{{ manufacturer['name'] }}</a></li> </ul> {% endfor %} </div> </div> </li> {% endif %} {% endif %} <!--manufacturer END--> </ul> </div> </div> </nav> </div> </div> </div> </div> {% endif %} menu.php <?php class ControllerCommonMenu extends Controller { public function index() { $this->load->language('common/menu'); // Menu $this->load->model('catalog/category'); $this->load->model('catalog/product'); $data['categories'] = array(); $categories = $this->model_catalog_category->getCategories(0); foreach ($categories as $category) { if ($category['top']) { // Level 2 $children_data = array(); $children = $this->model_catalog_category->getCategories($category['category_id']); foreach ($children as $child) { $filter_data = array( 'filter_category_id' => $child['category_id'], 'filter_sub_category' => true ); $children_data[] = array( 'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $this->model_catalog_product->getTotalProducts($filter_data) . ')' : ''), 'href' => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) ); } // Level 1 $data['categories'][] = array( 'name' => $category['name'], 'children' => $children_data, 'column' => $category['column'] ? $category['column'] : 1, 'href' => $this->url->link('product/category', 'path=' . $category['category_id']) ); } } return $this->load->view('common/menu', $data); } } ajaxMenu.zip
- 6 відповідей
-
- javascript
- яндекс
-
(і ще %d)
Теги:
-
Здравствуйте. Столкнулся с проблемой вывода подкатегорий в главное меню. Из коробки OpenCart выводит только категории первого уровня в меню. А мне нужно вывести в меню категории второго уровня и что бы они тоже их контролировать можно было checkbox как и первого уровня. Решаю проблему уже не первый день, немогу найти ответ. Версия OpenCart 3.0.3.7 тема default.
- 12 відповідей
-
- меню
- меню сайта
-
(і ще %d)
Теги:
-
Нужна помощь с меню сайта. на сайте есть вкладка в боковом меню типа светодиодные ленты,при наведении на него выпадает подменю с подкатегориями - цвет свечения, степень защиты и т.д. Под ними в свою очередь еще категории: белый синий т.д. Нужно что бы подкатегории - цвет свечения, степень защиты и т.д были не кликабельные. Напишите пож. цену работы.
-
Вывести меню третьего уровня.