1

I am learning Magento 2 theme and I am playing with layout. My goals is to move account links (Default welcome msg, Sign In, My account etc etc) into the navbar.

I used Magento Luma as parent theme for my theme and added default.xml layout as the following.

app/design/MyVendor/MyTheme/Magento_Theme/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" >
    <body>
        <referenceBlock name="header.panel"  remove="true"></referenceBlock>
        <move element="top.links" destination="catalog.topnav" after="-" as="navigation.account.links" ></move>
    </body>
</page>

It works but when the page is loading the links are placed into the nav, after the page stop loading they disappear, any suggestion?

And if i wanted to place the account links inside an icon, how I could accomplish this?

  • Any javascript involved in this? What does the web browser console tells you? – nicolallias Jun 1 '18 at 15:45
  • @nicolallias no js involved, neither error on the console. – Giulio Savoca Jun 1 '18 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.