Questions tagged [topmenu]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
50 views

Add a custom navbar menu

I am trying to add a custom link(contact us) in navbar menu and wanted to add the contact us page link. how to add that?
0
votes
1answer
20 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
10 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
56 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
53 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($...
1
vote
1answer
98 views

How to get sub category of sub category?

I have to load parent category, sub category and its sub categories. As of now, I can able to load the parent and its sub category but I have no idea how to load its sub category. Below is the code I ...
0
votes
0answers
41 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
15 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 ...
1
vote
2answers
90 views

Magento2.3: How to get sub category for parent category?

I have installed Magento2.3.2 EE on local. I have seen that the default category menu is not working correctly so that we want to load category and subcategory collection at top menu position with our ...
0
votes
1answer
61 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
0answers
49 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="...
0
votes
1answer
27 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.
0
votes
0answers
31 views

How to wrap header.links block in a custom div via layout XML?

I have a top menu which is generated by header.links block as <ul class="header links"> <li>...</li> ... </ul> I want to wrap this header.links block in another div as: &...
0
votes
0answers
24 views

Topmenu override declaration error Magento 2.3

Topmenu override declaration getting error in Magento 2.3
2
votes
1answer
22 views

Magento 2 dropdown not showing

In my catalog I have some categories and subcategories with product. But in my top nav I don't have any dropdown. What I have missed ?
0
votes
0answers
67 views

Magento2.1 top menu cache

Want to create cache for magento 2.1 menu to don't send request. Created cache folder and on menu.php on Block set directory but got below error: Error filtering template: Notice: Undefined ...
8
votes
3answers
956 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
1answer
155 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
49 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
69 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
93 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
29 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 ...
1
vote
0answers
34 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
99 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
31 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
113 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
1answer
58 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
76 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
20 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
47 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
2answers
284 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
122 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
936 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
491 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
48 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
188 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 ...
1
vote
2answers
87 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
66 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
282 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
404 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
18 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
3k 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\...
5
votes
0answers
56 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 >...
2
votes
1answer
559 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> <?...
1
vote
0answers
132 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.
2
votes
1answer
641 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 ...
1
vote
0answers
615 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 ...