how to call navigation bar in magento 2.2.6

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite












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 class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>


Then echo this elements call in myheader.phtml file.



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>


so my i have coming menu toggle but not display navigation bar please let me know how we can fix this issue.










share|improve this question









New contributor




neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • do you want to add top menu, catalog.nav ? or you have custom menu ?
    – Naveed Asim
    52 mins ago
















up vote
2
down vote

favorite












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 class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>


Then echo this elements call in myheader.phtml file.



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>


so my i have coming menu toggle but not display navigation bar please let me know how we can fix this issue.










share|improve this question









New contributor




neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • do you want to add top menu, catalog.nav ? or you have custom menu ?
    – Naveed Asim
    52 mins ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











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 class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>


Then echo this elements call in myheader.phtml file.



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>


so my i have coming menu toggle but not display navigation bar please let me know how we can fix this issue.










share|improve this question









New contributor




neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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 class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>


Then echo this elements call in myheader.phtml file.



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>


so my i have coming menu toggle but not display navigation bar please let me know how we can fix this issue.







navigation topmenu magento2.2.6






share|improve this question









New contributor




neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 42 mins ago









Purushotam Sharma

7511527




7511527






New contributor




neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









neha rani

154




154




New contributor




neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






neha rani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • do you want to add top menu, catalog.nav ? or you have custom menu ?
    – Naveed Asim
    52 mins ago
















  • do you want to add top menu, catalog.nav ? or you have custom menu ?
    – Naveed Asim
    52 mins ago















do you want to add top menu, catalog.nav ? or you have custom menu ?
– Naveed Asim
52 mins ago




do you want to add top menu, catalog.nav ? or you have custom menu ?
– Naveed Asim
52 mins ago










2 Answers
2






active

oldest

votes

















up vote
0
down vote



accepted










you need to add at default.xml:



 <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.container">
<block class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>
<move element="catalog.topnav" as="nav" destination="myheader"/>
</body>
</page>


And in Phtml you can get at myheader.phtml:



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>
<?php echo $this->getChildHtml("nav"); ?>





share|improve this answer






















  • only nav not working "prntscr.com/lalh92" please check this screenshot
    – neha rani
    56 mins ago











  • I think you you missed some tag in xml Or you need to flush cache.I have put whole code, please try again.
    – Pawan
    52 mins ago










  • Remember to flush cache.Above code is tested.
    – Pawan
    49 mins ago










  • prntscr.com/lali6e
    – neha rani
    48 mins ago










  • Please check my this screenshot please let me know."prntscr.com/lali6e"
    – neha rani
    47 mins ago

















up vote
3
down vote













as per screenshot https://prnt.sc/laljiy please put "Outfits", "shops" and "sale" category as child of "default category".



Let me know if it works.






share|improve this answer






















  • Yes its working thanks.
    – neha rani
    24 mins ago






  • 1




    do the need full.
    – Kruti Aparnathi
    19 mins ago










  • Good observation +1
    – Pawan
    7 mins ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






neha rani is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f247961%2fhow-to-call-navigation-bar-in-magento-2-2-6%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote



accepted










you need to add at default.xml:



 <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.container">
<block class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>
<move element="catalog.topnav" as="nav" destination="myheader"/>
</body>
</page>


And in Phtml you can get at myheader.phtml:



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>
<?php echo $this->getChildHtml("nav"); ?>





share|improve this answer






















  • only nav not working "prntscr.com/lalh92" please check this screenshot
    – neha rani
    56 mins ago











  • I think you you missed some tag in xml Or you need to flush cache.I have put whole code, please try again.
    – Pawan
    52 mins ago










  • Remember to flush cache.Above code is tested.
    – Pawan
    49 mins ago










  • prntscr.com/lali6e
    – neha rani
    48 mins ago










  • Please check my this screenshot please let me know."prntscr.com/lali6e"
    – neha rani
    47 mins ago














up vote
0
down vote



accepted










you need to add at default.xml:



 <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.container">
<block class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>
<move element="catalog.topnav" as="nav" destination="myheader"/>
</body>
</page>


And in Phtml you can get at myheader.phtml:



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>
<?php echo $this->getChildHtml("nav"); ?>





share|improve this answer






















  • only nav not working "prntscr.com/lalh92" please check this screenshot
    – neha rani
    56 mins ago











  • I think you you missed some tag in xml Or you need to flush cache.I have put whole code, please try again.
    – Pawan
    52 mins ago










  • Remember to flush cache.Above code is tested.
    – Pawan
    49 mins ago










  • prntscr.com/lali6e
    – neha rani
    48 mins ago










  • Please check my this screenshot please let me know."prntscr.com/lali6e"
    – neha rani
    47 mins ago












up vote
0
down vote



accepted







up vote
0
down vote



accepted






you need to add at default.xml:



 <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.container">
<block class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>
<move element="catalog.topnav" as="nav" destination="myheader"/>
</body>
</page>


And in Phtml you can get at myheader.phtml:



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>
<?php echo $this->getChildHtml("nav"); ?>





share|improve this answer














you need to add at default.xml:



 <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.container">
<block class="MagentoThemeBlockHtmlFooter" name="myheader" template="html/myheader.phtml" before="-"/>
</referenceContainer>
<move element="minicart" destination="myheader"/>
<move element="top.search" destination="myheader"/>
<move element="logo" as="logo" destination="myheader"/>
<move element="catalog.topnav" as="nav" destination="myheader"/>
</body>
</page>


And in Phtml you can get at myheader.phtml:



<?php echo $this->getChildHtml('minicart'); ?>
<?php echo $this->getChildHtml("logo"); ?>
<?php echo $this->getChildHtml("topSearch"); ?>
<?php echo $this->getChildHtml("nav"); ?>






share|improve this answer














share|improve this answer



share|improve this answer








edited 53 mins ago

























answered 1 hour ago









Pawan

1,2122515




1,2122515











  • only nav not working "prntscr.com/lalh92" please check this screenshot
    – neha rani
    56 mins ago











  • I think you you missed some tag in xml Or you need to flush cache.I have put whole code, please try again.
    – Pawan
    52 mins ago










  • Remember to flush cache.Above code is tested.
    – Pawan
    49 mins ago










  • prntscr.com/lali6e
    – neha rani
    48 mins ago










  • Please check my this screenshot please let me know."prntscr.com/lali6e"
    – neha rani
    47 mins ago
















  • only nav not working "prntscr.com/lalh92" please check this screenshot
    – neha rani
    56 mins ago











  • I think you you missed some tag in xml Or you need to flush cache.I have put whole code, please try again.
    – Pawan
    52 mins ago










  • Remember to flush cache.Above code is tested.
    – Pawan
    49 mins ago










  • prntscr.com/lali6e
    – neha rani
    48 mins ago










  • Please check my this screenshot please let me know."prntscr.com/lali6e"
    – neha rani
    47 mins ago















only nav not working "prntscr.com/lalh92" please check this screenshot
– neha rani
56 mins ago





only nav not working "prntscr.com/lalh92" please check this screenshot
– neha rani
56 mins ago













I think you you missed some tag in xml Or you need to flush cache.I have put whole code, please try again.
– Pawan
52 mins ago




I think you you missed some tag in xml Or you need to flush cache.I have put whole code, please try again.
– Pawan
52 mins ago












Remember to flush cache.Above code is tested.
– Pawan
49 mins ago




Remember to flush cache.Above code is tested.
– Pawan
49 mins ago












prntscr.com/lali6e
– neha rani
48 mins ago




prntscr.com/lali6e
– neha rani
48 mins ago












Please check my this screenshot please let me know."prntscr.com/lali6e"
– neha rani
47 mins ago




Please check my this screenshot please let me know."prntscr.com/lali6e"
– neha rani
47 mins ago












up vote
3
down vote













as per screenshot https://prnt.sc/laljiy please put "Outfits", "shops" and "sale" category as child of "default category".



Let me know if it works.






share|improve this answer






















  • Yes its working thanks.
    – neha rani
    24 mins ago






  • 1




    do the need full.
    – Kruti Aparnathi
    19 mins ago










  • Good observation +1
    – Pawan
    7 mins ago














up vote
3
down vote













as per screenshot https://prnt.sc/laljiy please put "Outfits", "shops" and "sale" category as child of "default category".



Let me know if it works.






share|improve this answer






















  • Yes its working thanks.
    – neha rani
    24 mins ago






  • 1




    do the need full.
    – Kruti Aparnathi
    19 mins ago










  • Good observation +1
    – Pawan
    7 mins ago












up vote
3
down vote










up vote
3
down vote









as per screenshot https://prnt.sc/laljiy please put "Outfits", "shops" and "sale" category as child of "default category".



Let me know if it works.






share|improve this answer














as per screenshot https://prnt.sc/laljiy please put "Outfits", "shops" and "sale" category as child of "default category".



Let me know if it works.







share|improve this answer














share|improve this answer



share|improve this answer








edited 27 mins ago

























answered 33 mins ago









Kruti Aparnathi

312




312











  • Yes its working thanks.
    – neha rani
    24 mins ago






  • 1




    do the need full.
    – Kruti Aparnathi
    19 mins ago










  • Good observation +1
    – Pawan
    7 mins ago
















  • Yes its working thanks.
    – neha rani
    24 mins ago






  • 1




    do the need full.
    – Kruti Aparnathi
    19 mins ago










  • Good observation +1
    – Pawan
    7 mins ago















Yes its working thanks.
– neha rani
24 mins ago




Yes its working thanks.
– neha rani
24 mins ago




1




1




do the need full.
– Kruti Aparnathi
19 mins ago




do the need full.
– Kruti Aparnathi
19 mins ago












Good observation +1
– Pawan
7 mins ago




Good observation +1
– Pawan
7 mins ago










neha rani is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















neha rani is a new contributor. Be nice, and check out our Code of Conduct.












neha rani is a new contributor. Be nice, and check out our Code of Conduct.











neha rani is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f247961%2fhow-to-call-navigation-bar-in-magento-2-2-6%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

Installing NextGIS Connect into QGIS 3?

One-line joke