3 deleted 6 characters in body
source | link

I am new in magento 2. i am facing a problem with default top-menu block. I create a custom header and i want to move top-menu block in my custom header. But not get success Code:

Custom header file :

<div class="header">  <?php //echo $this->getChildHtml("logo"); ?> 
        <div class="container">
             <div class="nav-top">
                <?php echo $this->getChildHtml("catalogTopnav"); ?> 
             </div>
</div>
</div>

layout/default.xml layout/default.xml

<referenceContainer name="header.container">
             <block class="Magento\Framework\View\Element\Template" 
              name="custom_header" as="custom_header" 
              template="Magento_Theme::html/customheader.phtml"  before="-" /></referenceContainer>
     
<move element="catalog.topnav" destination="custom_header" after="logo" />

Please help me any one how to print top menu item in my custom header. thanks in advance

I am new in magento 2. i am facing a problem with default top-menu block. I create a custom header and i want to move top-menu block in my custom header. But not get success Code:

Custom header file :

<div class="header">  <?php //echo $this->getChildHtml("logo"); ?> 
        <div class="container">
             <div class="nav-top">
                <?php echo $this->getChildHtml("catalogTopnav"); ?> 
             </div>
</div>
</div>

layout/default.xml

<referenceContainer name="header.container">
             <block class="Magento\Framework\View\Element\Template" 
              name="custom_header" as="custom_header" 
              template="Magento_Theme::html/customheader.phtml"  before="-" /></referenceContainer>
 
<move element="catalog.topnav" destination="custom_header" after="logo" />

Please help me any one how to print top menu item in my custom header. thanks in advance

I am new in magento 2. i am facing a problem with default top-menu block. I create a custom header and i want to move top-menu block in my custom header. But not get success Code:

Custom header file :

<div class="header">  <?php //echo $this->getChildHtml("logo"); ?> 
        <div class="container">
             <div class="nav-top">
                <?php echo $this->getChildHtml("catalogTopnav"); ?> 
             </div>
</div>
</div>

layout/default.xml

<referenceContainer name="header.container">
             <block class="Magento\Framework\View\Element\Template" 
              name="custom_header" as="custom_header" 
              template="Magento_Theme::html/customheader.phtml"  before="-" /></referenceContainer>    
<move element="catalog.topnav" destination="custom_header" after="logo" />

Please help me any one how to print top menu item in my custom header. thanks in advance

2 format the code
source | link

I am new in magento 2. i am facing a problem with default top-menu block. I create a custom header and i want to move top-menu block in my custom header. But not get success Code:

Custom header file :

Custom<div headerclass="header"> file :<?php //echo $this->getChildHtml("logo"); ?> 
        <div class="container">
             <div class="nav-top">
                <?php echo $this->getChildHtml("catalogTopnav"); ?> 
             </div>
</div>
</div>
getChildHtml("logo"); ?> getChildHtml("catalogTopnav"); ?>

layout/default.xml

 layout/default.xml

 
<referenceContainer name="header.container">
             <block class="Magento\Framework\View\Element\Template" 
              name="custom_header" as="custom_header" 
              template="Magento_Theme::html/customheader.phtml"  before="-" /></referenceContainer>

<move element="catalog.topnav" destination="custom_header" after="logo" />

Please help me any one how to print top menu item in my custom header. thanks in advance

I am new in magento 2. i am facing a problem with default top-menu block. I create a custom header and i want to move top-menu block in my custom header. But not get success Code:

Custom header file :
getChildHtml("logo"); ?> getChildHtml("catalogTopnav"); ?>

layout/default.xml

 

 

Please help me any one how to print top menu item in my custom header. thanks in advance

I am new in magento 2. i am facing a problem with default top-menu block. I create a custom header and i want to move top-menu block in my custom header. But not get success Code:

Custom header file :

<div class="header">  <?php //echo $this->getChildHtml("logo"); ?> 
        <div class="container">
             <div class="nav-top">
                <?php echo $this->getChildHtml("catalogTopnav"); ?> 
             </div>
</div>
</div>

layout/default.xml

<referenceContainer name="header.container">
             <block class="Magento\Framework\View\Element\Template" 
              name="custom_header" as="custom_header" 
              template="Magento_Theme::html/customheader.phtml"  before="-" /></referenceContainer>

<move element="catalog.topnav" destination="custom_header" after="logo" />

Please help me any one how to print top menu item in my custom header. thanks in advance

1
source | link

How can i put default top menu item inside custom header in magento 2

I am new in magento 2. i am facing a problem with default top-menu block. I create a custom header and i want to move top-menu block in my custom header. But not get success Code:

Custom header file :
getChildHtml("logo"); ?> getChildHtml("catalogTopnav"); ?>

layout/default.xml

Please help me any one how to print top menu item in my custom header. thanks in advance