I want to move the sign in
link inside the header container after the minicart
.
Please refer the image below.
As you can see in the image i have pointed it out where it should go.
Now, Some brief information about what i have done.
I have removed the header-wrapper
by placing below code in default.xml
<referenceBlock name="header-wrapper" remove="true" />
Then, i have added a custom block where i have created my own custom header like shown in the image, by placing below code in 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" after="header.panel.wrapper" />
</referenceContainer>
Then, i moved all elements into by own custom block by placing below code in default.xml
<move element="minicart" destination="custom-header"/>
<move element="top.search" destination="custom-header"/>
<move element="logo" as="logo" destination="custom-header"/>
Now the problem, and things i have tried to solve this.
I want to move sign in
link to my own custom-header
block. To do this i have tried below things.
By placing below code in default.xml
<move element="authorization.link" destination="custom-header"/>
<move element="authorization-link-login" destination="custom-header" />
Also by placing this code in default.xml
<referenceContainer name="custom-header">
<container name="sign-in-div" htmlTag="div" htmlClass="signin-wrap" after="logo">
<block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="Magento_Theme::account/link/authorization.phtml" />
</container>
</referenceContainer>
Please suggest what i am doing wrong here.
Any help would be deeply appreciated.
Best Answer
In my previous experience with one of my client same (near to) requirement.
Header links needed before minicart without default message, so I'm sharing my experience matching your's requirement.
Link(s) on right side of minicart.
In your theme folder add below code in below file :
or
1. Move Sign-In Link next to minicart
2. Move All top Header Links next to minicart
Note : LESS