I would like to move top.links to outside panel.
In default.xml:
<move element="top.links" destination="custom_header" />
In customheader.phtml:
<?php echo $this->getChildHtml("topLinks"); ?>
but it's not picking up the top links.
Do you have any suggestions?
Hi @tvgarden
Have you overrided this in your custom theme ?
Refer this links - https://magento.stackexchange.com/questions/103503/how-to-move-the-top-links-to-the-navigation-bar-m...
explained it well on this link how to move top links , that will helps you to resolve the issue .
Hi @Manthan Dave ,
Thanks for the link.
I have gone through the solution but it's still not appearing.
My default.xml is:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <css src="Hiddentechies_Bizkick::css/bootstrap.min.css"/> <css src="Hiddentechies_Bizkick::css/owl.carousel.css"/> <css src="Hiddentechies_Bizkick::css/owl.theme.css"/> <css src="Hiddentechies_Bizkick::css/owl.transitions.css"/> <css src="Hiddentechies_Bizkick::css/fancybox/jquery.fancybox.css"/> <css src="Hiddentechies_Bizkick::css/font-awesome.min.css"/> <css src="Hiddentechies_Bizkick::css/calculus.css"/> </head> <body> <referenceContainer name="head.additional"> <block class="Magento\Framework\View\Element\Template" name="custom.css" template="Hiddentechies_Bizkick::customcss.phtml" before="-"/> </referenceContainer> <!--To add custom logo--> <referenceBlock name="logo"> <arguments> <argument name="logo_file" xsi:type="string">images/logo.png</argument> <argument name="logo_img_width" xsi:type="number">300</argument> <argument name="logo_img_height" xsi:type="number">78</argument> </arguments> </referenceBlock> <referenceContainer name="header.container"> <block class="Magento\Framework\View\Element\Template" name="custom_header" as="custom_header" template="Hiddentechies_Bizkick::html/customheader.phtml" before="-"/> <container name="header.panel.wrapper" htmlClass="panel wrapper" htmlTag="div" before="-"> <container name="header.panel" label="Page Header Panel" htmlTag="div" htmlClass="panel header"> </container> </container> <referenceBlock name="top.links"> <block class="Magento\Theme\Block\Html\Header" name="header" as="header" before="-"> <arguments> <argument name="show_part" xsi:type="string">welcome</argument> </arguments> </block> </referenceBlock> </referenceContainer> <move element="minicart" destination="custom_header"/> <move element="top.search" destination="custom_header"/> <move element="top.links" destination="custom_header"/> <move element="logo" as="logo" destination="custom_header"/> <referenceContainer name="footer-container"> <block class="Magento\Framework\View\Element\Template" as="bizkick.footer" name="bizkick.footer" template="Hiddentechies_Bizkick::html/footer.phtml"> <block class="Magento\Framework\View\Element\Html\Links" name="footer_links"> <arguments> <argument name="css_class" xsi:type="string">footer links</argument> </arguments> </block> <block class="Magento\Theme\Block\Html\Footer" name="copyright" template="html/copyright.phtml"/> </block> <referenceBlock name="report.bugs" remove="true"/> <referenceBlock name="footer" remove="true"/> </referenceContainer> <referenceContainer name="page.wrapper"> <block class="Magento\Framework\View\Element\Template" as="blzkick.above" name="blzkick.above" template="Hiddentechies_Bizkick::bizkickabove.phtml" before="main.content" /> <block class="Magento\Framework\View\Element\Template" as="blzkick.below" name="blzkick.below" template="Hiddentechies_Bizkick::bizkickbelow.phtml" after="main.content" /> </referenceContainer> <referenceBlock name="wish-list-link" remove="true"/> </body> </page>
And customheader.phtml is:
<header class="header page-main"> <div class="row"> <div class="col-sm-4 col-xs-12"> <?php echo $this->getChildHtml("logo"); ?> </div> <div class="col-sm-4 col-xs-12"> <div class="table-cell"> <h3><i class="fa fa-phone"></i> 01253 841387</h3> <?php echo $this->getChildHtml("topSearch"); ?> </div> </div> <div class="col-sm-4 col-xs-12 text-right"> <div class="table-cell footer_links"> <?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId("header-right-column")->toHtml(); ?> <?php echo $this->getChildHtml("topLinks"); ?> <?php echo $this->getChildHtml('minicart'); ?> </div> </div> </div> </header>