Can I have two header.links blocks in the same default.xml file? So that one appears in the header-wrapper and the other in the store.menu
What I'm trying to do is have the join/register links in the header on desktop, but for mobile have them in the dropdown menu.
Cheers
-
could you please little clear, what actually you want because currently they are coming same as you required in luma themeManoj Deswal– Manoj Deswal2017年07月25日 03:36:23 +00:00Commented Jul 25, 2017 at 3:36
-
I'm using the blank theme / but in the theme (blank/luma) the "sign in" appears in the "Account" tab. I want it to appear in the menu tab onlyRob Webqem– Rob Webqem2017年07月25日 05:01:37 +00:00Commented Jul 25, 2017 at 5:01
-
try moving "store.links to store.menu"Manoj Deswal– Manoj Deswal2017年07月25日 05:15:26 +00:00Commented Jul 25, 2017 at 5:15
-
<move element="store.links" destination="store.menu" before="catalog.topnav"/> is not working for me / any ideas?Rob Webqem– Rob Webqem2017年07月25日 23:13:51 +00:00Commented Jul 25, 2017 at 23:13
1 Answer 1
I've fixed the issue with the following code in default.xml
<!-- Add elements to mobile dropdown menu -->
<referenceBlock name="store.menu">
<container name="nav-authorization" label="Nav Authorization" as="nav-authorization" htmlTag="ul" htmlClass="nav-authorization">
<block class="Magento\Customer\Block\Account\AuthorizationLink">
<arguments>
<argument name="label" xsi:type="string">authorization</argument>
</arguments>
</block>
<block class="Magento\Customer\Block\Account\RegisterLink">
<arguments>
<argument name="label" xsi:type="string">Register</argument>
</arguments>
</block>
<block class="Magento\Customer\Block\Account\Link">
<arguments>
<argument name="label" xsi:type="string">My Account</argument>
</arguments>
</block>
</container>
</referenceBlock>
default