Questions tagged [topmenu]

The tag has no usage guidance.

75 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
74 views

Magento 2 icon font position problem (navigation menu)

Magento2 - I am trying to put some icons in my navigation menu, I want them to be on top of the subcategory name but this is what I have until now: This is my code for the first item, I have it in >...
3
votes
0answers
938 views

magento 2: \Magento\Theme\Block\Html\Topmenu $this->_menu

I am currently working on a custom block class that extends \Magento\Theme\Block\Html\Topmenu I have the following in my template file that uses my custom block class: <?php $menuTree1 = $block-...
3
votes
1answer
385 views

Have category page main menu based on current category

I've tried Google - but maybe I just can't word this question correctly to get an answer. I want my top-level category pages to change the main menu to only show the current category. So, for ...
2
votes
0answers
119 views

How to set Drop Down menu on mouse hover in TopMenu. Magento 2

How to set custom item in TopMenu to show DropDown menu on mouse hover I tried this code app/code/StackExchange/Menu/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/...
2
votes
1answer
174 views

Move top menu bar to left side in Magento 2

I want to move the top menu bar to left sidebar I have written this code <move element="catalog.topnav" destination="header-wrapper" after="block-search"/> Through this code it is moving in ...
2
votes
1answer
707 views

How can we remove an attribute from the xml block in layout file in magento2?

I need to remove the ttl attribute value from catalog.topnav block in default.xml file. I have overrided the file in custom path as follows: Magento_Theme/layout/default.xml <referenceBlock ...
2
votes
2answers
2k views

magento2.2 override topmenu.php: _addSubMenu()

I am trying to override the Topmenu Module Block but I can not understand why it fails. I am trying to override the following method: magento/module-theme/Block/Html/Topmenu.php:_addSubMenu(...) I ...
2
votes
0answers
501 views

magento2 prepend item into menu tree object (Topmenu)

So I've already hooked the "page_block_html_topmenu_gethtml_before" event with the observer class, I can add items to the menu tree, and it works fine, but I can't prepend items to the menu tree ...
2
votes
0answers
28 views

Magento 1.7 using category as Top Navigation at the same time sub-navigation to other menu

How do I add the category as Top Navigation and at the same time it's a sub-navigation under different Top Menu. I'm using Magento 1.7. I'm not losing hope for this. I know someone here can help. ...
2
votes
2answers
935 views

Remove category(Top menu) for specific customer or customer group

I m using magento 1.9.0.1 to remove cateogroy from frontend top menu for specific category for specific customer or customer group. I m using below code for testing but it not work /frontend/default/...
1
vote
0answers
91 views

Magento 2 - Move Sign Out link at the last position in customer menu dropdown

I want to move authorization-link at the last position in customer menu. How can I achieve that? UPDATE: Code from xml <referenceBlock name="top.links"> <referenceBlock name="...
1
vote
0answers
104 views

How to set custom Dropdown on Top Menu in Magento 2

I want to set my custom div on my custom Brands link in Top Menu like I create my custom link in Top Menu the code is <?php namespace Vender\Module\Plugin\Block; use Magento\Framework\Data\...
1
vote
0answers
35 views

Magento 2.3.1 Multiple categories showing active, How to remove duplicate active class?

In my instance, I have updated Magento 2.3.1 from 2.3.0. I have an issue that more than one categories are showing active on each page. it shows randomly selected more than one categories. How ...
1
vote
0answers
33 views

show top menu bar to left side in magento2

I want to replace the top menu bar to the left side i have written this code in my theme default.xml <body> <referenceContainer name="sidebar.main"> <block class="Magento\Framework\...
1
vote
1answer
46 views

How to insert custom link before last menu in magento 2?

I have 5 categories in main menu and want to add custom link in between menu. How can I add this? For example: Menu1 Menu2 Menu3 Menu4 Custom_Link(Static) Menu5 Code Is: <ul> <?...
1
vote
0answers
175 views

How to set the category for menu programmatically Magento 2

How can I set the root category for menu programmatically on Magento 2? I want to create a menu with a given category ID, so that given category will load on the menu.
1
vote
0answers
706 views

Display sub category image in top menu - Magento2

I want to display sub-category images in the top menu. I used this but does not show it sub-category images. Create your module Create a folder in app/code/Vendor/NavigationMenu, where ‘vendor’ is ...
1
vote
0answers
274 views

Magento 2 add parent ID as class on children in Topmenu

I made a theme in magento 2.2 based on Luma, and I have to make a design for the Topmenu like in the picture below. This is the category structure in backend. I already made a plugin that displays ...
1
vote
0answers
64 views

Magento 2 top header currency code

How to remove the Links at the top header ie. sign in, create account and currency change and want to place it custom page(only currency selector). Please someone tell me how to do that.
1
vote
0answers
20 views

Adding view all in subcategory for magento theme 1.9.2

I want to add view-all option with the subcategory in main menu for magento theme 1.9.2. currently my menu appears like this- category1 --subcategory1 --type1 --type2 --subcategory2 I want ...
1
vote
3answers
769 views

Menu not showing on varnish enable

After Varnish cache enables from Magento admin catalog menu disappears Steps I follows to enable cache *Admin>>> Store >> Configuration *Advanced>>>> System *Full Page Cache Please find setting ...
1
vote
0answers
207 views

Magento 1.9 renderCategoriesMenuHtml very slow

I am trying to improve the store speed and I found that main Menu is very slow. I want to make magento do an ajax call for calling the menu, but I cannot understand how should work that. <?php $...
1
vote
0answers
239 views

Where is the JS file located to change the aria-expanded=true in Magento 2

I'm new to Magento 2.2... I need to output submenu under a top menu dropdown with three columns. The base Luma theme shows single column for dropdown menu. I have done the change in the code /app/...
1
vote
0answers
117 views

In frontend menu, the links are not popping out when in hamburger menu is clicked

In magento 2 ..while responsive mode the hamburger menu gets displayed. but when clicking on the menu the hamburger menu is not popping out links. I don't know why.? this is my sections.phtml file ...
1
vote
0answers
529 views

load top menu via ajax

I want to load the top menu with ajax , so far i have created another php file that will serve the menu on the header by trying to customise it to magento following this tutorial: http://phppot.com/...
1
vote
0answers
53 views

No navbar at the default themes

I am new to Magento. I want to create a menu with different pages, but I don't have a navigation bar on top. How do I add a navigationbar? This is my topmenu.phtml: <?php $_menu = $this->...
1
vote
0answers
80 views

Magento2 2.0.7 enterprise - Menu Override is just showing a blank page after adding a simple override

I'm just doing a simple override to modify the structure of the menu. But weird thing is after creating the module and just extending the topMenu. It just gives a blank page. Here is my current code :...
1
vote
2answers
340 views

topMenu not displaying as childHtml of custom block

I have the following xml declaration. <reference name="header"> <block type="usability/features" name="usability.features" as="usability_features" template=" client/usability/...
1
vote
0answers
81 views

Changing the Top Menu from Displaying Categories to Page Links?

If this is a duplicate question, please be kind enough to point me in the right direction to a solution as I've searched already :( Just configuring a Magento CE 1.9 template (by Templatemela) and ...
1
vote
0answers
81 views

Top Category links disabling click

Currently my template is using Mega Menu. /RWD/ If 'casting supplies' is clicked on an iPad it will go to the category page and not just drop down the menu. How do I change it so that when 'Casting ...
1
vote
2answers
547 views

How to add cutom class for specifed menu id in main top menu?

Am new to magento 1.9 using custom theme,How to add custom class for particular Topmenu id for playing it with css without disturbing other menu ids. <div id="menu9" class="menu"></div> ...
1
vote
4answers
3k views

How to add Custom Menu item and submenu in navigation bar Magento 2?

I am struggling to add a non-category custom menu in the navigation bar and also a sub-menu. Please help. Thanks.
1
vote
1answer
336 views

Add a span in nav top meu

I want to add a span in nav top menu after every li. Also in this span I want to add an image (arrow-down). I added this code in top.html but nothing show!!! <span class="arrow"><img src="...
0
votes
0answers
13 views

BRAND as catalog NAVIGATION AND as FILTER option. COMMENTS requested

The goal is to use the product’s brand for the Layered navigation (Categories) , AND for the filtering of the products. Yes…. Sure we know ... we can BUY plenty of MARKETPLACE solutions... BUT maybe ...
0
votes
1answer
77 views

Add custom menu links only to mobile menu layout

I am using Magento 2.2.2 and I am trying to add some custom menu links to magento in the mobile menu layout. I tried adding a custom block with menu links by referring catalog.topnav block default....
0
votes
0answers
25 views

Sort Menu items in aphabetical order magento 2 in observer

I am creating menu items in magento 2. I is working fine and generated according to category order in admin dashboard. But I wanted to sort the menu items alphabetically on store front ir-respective ...
0
votes
0answers
46 views

How to change top menu dynamically - Magento 2

I want to change the menu dynamically in the top navigation bar. If the customer didn't log in it should be LOGIN and after the login, it should change to ORDER DETAILS. The current menu i have ...
0
votes
0answers
23 views

Magento2: Display 3 level menu on hover of level 1 menu

I want to display 3rd level submenu once we hover on 1st level menu. Like if I hover on WOMEN then Tops sub-menu auto shows. The file I assume for the menu is: /var/www/html/magento233/lib/web/...
0
votes
0answers
44 views

How to hide a category in the top menu programmatically in Magento 2?

I know that Enterprise Edition meets the requirement. What I want is to show the category "Wholesale" just to my customer group in "Wholesale". When a customer is logged in and he is in this group, ...
0
votes
0answers
21 views

Magento2 - How to create header and footer menu in custom theme managed from backend?

How to create header and footer menu in custom theme managed from backend?
0
votes
1answer
33 views

Magento 2: Topmenu 4th level categories out of place

I use Magento 2 (Version 2.3.2) with standard luma theme. If i navigate the topmenu down to the 3rd level and hover over some category, that opens up the 4th level, i often cant reach the 4th level ...
0
votes
1answer
24 views

Top navigation menu without dropdown

Magento 2.3.3, custom theme based on Blank. It's a very small store with only two categories. I want to display them in the top navigation menu without a dropdown menu. In other words, just a ...
0
votes
0answers
12 views

How to display category image with the label in the top menu in Magento 2.3

I'm new on Magento, I want to display the category image with the category name without using an extension, is it possible ? Thank you.
0
votes
0answers
19 views

Change color of space between Topmenu and Page main

I have a website where the header area is a dark color, then the top image of the page main is dark. Unfortunately I get a white strip between the two areas that I cannot seem to figure out how to ...
0
votes
3answers
85 views

How to display category image in Megamenu?

I want to display the category image in mega menu(which we have created using html) but not success. I have no idea, how to make this work so I'm here and hoping someone can help me with this. ...
0
votes
1answer
96 views

How to load Category image in top menu?

I have loaded the category and sub-category, now I need to load image as well but I'm not sure how to do that. Below is the code I have used: In block file: public function getStoreCategories($...
0
votes
0answers
53 views

How to write a condition to show down arrow if the category has sub-category?

I want to show down arrow when if the parent category has a child category. As of now, the code I'm working is showing the down arrow for all the parent categories even though it doesn't has a sub ...
0
votes
0answers
16 views

Creating 2 menus from 2 separate categories

So, I am trying to accomplish this design. My issue is trying to populate 2 separate menus because it seems as though I have to create two root categories(which I understand why that is stupid) or ...
0
votes
1answer
78 views

Magento2: How to load category collection?

I have to load the category collection and show it on top menu position on my Magento site. I have tried object manager concept but it's not correct method to follow so that I have to load it using ...
0
votes
1answer
28 views

How can I add brands and flavors in navigation menu with categories?

I want to show categories of items also want to show the brands and flavors of item according to the parent it has.