Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [topmenu]

The tag has no usage guidance.

0
votes
0answers
12 views

Magento 2.3 - Topmenu tabs with wrong (cached) 'active' class

I have a small menu problem. The active tabs do not match the active class. If I disable the static_block cache it works again, so it actually looks like the menu is cached and continues to display ...
2
votes
0answers
16 views

Magento 2 Custom cache for top menu

I want to create custom cache for top menu For this I have created cache.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
21 views

How to customise category top menu navigation by custom category id in Magento 2?

By default Magento 2 showing the all store categories in top menu with a tree structure, I want to filter with custom category ids and only that filtered category need to show in category top menu ...
1
vote
0answers
22 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\...
2
votes
0answers
33 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/...
0
votes
0answers
19 views

Magento2 Which table store category ascending order or descending order store category

My project category and sub category I have set ascending order or descending order store category via script or sql query. Magento2 Which table store category & sub category ascending order or ...
0
votes
0answers
16 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 ...
2
votes
1answer
33 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 ...
1
vote
0answers
27 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
54 views

Magento 2 : How to show a menu in header part?

I want to show a menu in header part in magento 2? please help me how to add in header part?
1
vote
0answers
23 views

Magento 2.2.5 product redirects to other category

I'm having a strange situation. When i select a product in my webshop, the category and breadcrumps are from a different category. Yes, the product is also available in this category, but i don't want ...
0
votes
1answer
31 views

How to start top menu by some specific category in magento 2

How to start top menu by some specific category ID in magento 2. Something like this in topmenu.phtml <?php $categoryID = 6; $_menu = $block->getHtml('level-top', 'submenu', $columnsLimit, $...
0
votes
1answer
36 views

show a custom attribute instead of full name if customer logged in M2

I want to display in top menu my custom attribute instead of full name customer, I tried to override customer.phtml under design my theme but no result please any help <? $objectManager =...
0
votes
0answers
18 views

Sort Magento Topmenu (category name)

Is it possible to set a sort order for the default Magento topmenu block? I know it's possible to sort categories by dragging them in the order you want. But if you have multiple languages the order ...
0
votes
1answer
34 views

Magento 2.2.5 Show customer header links in Category navigation menu

In Magento 2.2.5, Is there any way to display the top customer header links in Category navigation menu. Like this
0
votes
1answer
134 views

Magento 2.3 menu static block as dropdown

Currently in Magento 2.3 the dropdown menu only can show the subcategories. I want to change this so that the subcategories are not displayed but only a specific static block. Inside that block I ...
0
votes
1answer
42 views

Cannot add custom topmenu link with plugin

I want to add custom links to the topmen / a submenu in the topmenu (I need the links for custom filters). To achieve this, I have created a plugin: app/code/Vendor/Module/etc/frontend/di.xml: <...
0
votes
1answer
181 views

Magento 2 Overwrites Topmenu.php In Module But Menu Nav Disappears

My di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <...
0
votes
0answers
21 views

Add Custom Link Under Existing Categories

I would like to add some links under a specific categories, not subcategories ! Normally you would create a subcategory under a category and so on but, I need to add some filter link which in turn it ...
1
vote
1answer
192 views

Magento2: how can i override protected function

i want to override CategoryProcessor.php namespace Magento\CatalogImportExport\Model\Import\Product; I have created my custom module but not override. my registration file <?php \Magento\...
0
votes
1answer
31 views

Magento2:importing csv category include in menu enable

when i import product's csv. All products and category created successfully also all categories include in menu. I want when i import csv , all thing will be done , but not include in menu categories. ...
0
votes
0answers
43 views

Display Categories as Menu

I am using Codazon theme in Magento 1 Store. How can I display Categories as Menu ? Backend Frontend
0
votes
0answers
14 views

Magento 2 Adding non category Submenu

I have created a custom menu link using few examples one of them is:Adding a non-category link to the navigation links in magento 2 This is how I've added first level menu: ... $...
0
votes
0answers
102 views

How to display categories in menu in the same order as in admin category tree?

I wonder if there way to have same sort order of categories in frontend menu as in admin panel category tree. I thought position attribute should be used for this goal, but I've found that categories ...
0
votes
0answers
29 views

Magento 2 main menu didn't display after transfer from server to localhost

My main menu doesn't display on storefront after taking live backup. when i logged in on admin panel my all products and categories shown in products and category pages, but they didn't display on the ...
1
vote
2answers
45 views

Magento 1.9 can't find topLinks block

I'm using Porto theme (documentation: porto doc) and i want to change to topLinks: The problem is that i can't find the static block that contains those links. Or are those links inside a .phtml ...
0
votes
1answer
47 views

Show category description in top menu Magento 2.1

i'm trying to show the categories in the top menu with the corresponding category description but can't find any function for that. With the object manager i can get the id, name etc. but not the ...
4
votes
2answers
168 views

how to call navigation bar in magento 2.2.6

How to call navigation main menu in magento2.2? please let me know. I follow this code for our custom header in default.xml file. <referenceContainer name="header.container"> <block ...
0
votes
1answer
165 views

Categories not appearing in correct order in top menu

For some reason, certain categories don't display in the correct order in the top category menu, but instead appear after the list of the other categories. Any thoughts? I've double-checked store ...
1
vote
0answers
17 views

Add image to new backend top menu [duplicate]

i've successfully create a top menu in magento 2 like this: <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
2
votes
1answer
1k views

PHP fatal error: Uncaught TypeError: Argument 2 passed to Magento\Catalog\Plugin\Block\Topmenu

this is happening when I install megamenu from template monster and updated to Magento 2.2.6 any ideas? full error below Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Catalog\Plugin\...
4
votes
0answers
38 views

Magento 2 icon font position problem (navigation menu)

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 untill now: This is my code for the first item, I have it in >Magento ...
2
votes
1answer
260 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 ...
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> <?...
0
votes
0answers
96 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.
0
votes
0answers
79 views

Magento 2 : How to only show subcategories of a specific category in top menu?

How can i make the top navigation menu just like the following website?
3
votes
1answer
425 views

Magento2 add a cms page link to menu

I have added CMS page link to the top menu by following the below tutorial: http://www.amitbera.com/magento2-add-a-cms-page-link-to-menu/ Since one of the custom menu items would be Home, so it ...
0
votes
0answers
32 views

Magento2: Navigation sections list display level in home page

I have moved the top navigation menu into right sidebar like follows and it worked. <move element="navigation.sections" destination="div.sidebar.main"/> But the listing of the categories are ...
1
vote
0answers
429 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 ...
2
votes
1answer
395 views

How to create the magento2 Mega drop down menu?

Creating mega drop down menu on magento2, able to get the data from the database product categories and subcategories
0
votes
1answer
250 views

Magento2 - how to show custom menu in top menu?

I need to show only first level categories and their products on top menu to replace Magento's default top menu. For example categories and products should display like: Tshirts    Polo ...
0
votes
1answer
57 views

Category ID not matching with current category

I'm displaying image of categories into my menu. It's working until the ID for the category is 10. Pasted 10, the ID restart to 1, so my ID 11 is having the properties of the 1, like it's image (...
0
votes
1answer
245 views

Magento 2 : Top menu count subcategories

I have a top menu like Parent > Category > Subcategories. I need to count the subcategories of category and if > 4, to show All categories as a link to the Category level. I have to mention that I am ...
0
votes
1answer
448 views

I want to show navigation arrows in luma theme

I want to show navigation arrows in luma theme like blank theme nav of Magento 2. Anybody can suggest me how can I do this ?
0
votes
1answer
68 views

How to hide the menu bar (with all the categories) on all pages except the front page?

Magento 1.9.1 Porto theme We have a massive categories' menu bar at the top of the website with 14 long category names. It is taking way too much real estate space and we don't really need it other ...
1
vote
4answers
265 views

How to add a category in main menu in magento 2

I am new in Magento 2. Can anybody can tell me that how I add a category to the main menu. Thanks
0
votes
2answers
164 views

Topmenu add extra elements

I am trying to add the category description in the main navigation dropdown for the level 1 child and for level 2 I want to display as a list the product names, so far, I have made a plugin Vendor\...
1
vote
1answer
661 views

Add custom css class to each item in Topmenu - Magento 2

I'm looking for a way to add a custom css class to each menu item into the Topmenu. I already tried to it using interceptor method in Topmenu public function beforeGetHtml( \Magento\Theme\Block\...
0
votes
2answers
242 views

Magento 2.2 removing horizontal menu from front page only

i am trying the following code : <referenceContainer name="page.top"> <referenceBlock name="main_menu" remove="true" /> </referenceContainer> in the DESIGN TAB > Layout ...
0
votes
1answer
87 views

Magento -2 homepage top navigation

I am messing with this problem for two days, i want my horizontal menu to appear on all pages except the homepage. my homepage shows both vertical and horizontal menu, however, i just want vertical ...