Magento2: How to add custom link at top header links after LogIn Or Register link in Magento2
Here I will show you how we can add new custom link at top header links after LogIn Or Register links.
Please refer my previous post to create a custom link at header but displayed after logged in account,
if you want to show your custom link before logged in or just want to show link any time at header after Register link follow below steps.
Step 1: Refer my previous post to create a custom link at header but displayed after logged in account. Click Here...
Step 2: Now open app\code\Mynamespace\Mymodule\view\frontend\layout\default.xml file and add below code after <referenceBlock name="top.links"></referenceBlock>
Code To Add:
Here "test-link" is the name of your test link block which created in step 1.
Step 3: Refresh Cache and you have done it.
Please refer my previous post to create a custom link at header but displayed after logged in account,
if you want to show your custom link before logged in or just want to show link any time at header after Register link follow below steps.
Step 1: Refer my previous post to create a custom link at header but displayed after logged in account. Click Here...
Step 2: Now open app\code\Mynamespace\Mymodule\view\frontend\layout\default.xml file and add below code after <referenceBlock name="top.links"></referenceBlock>
Code To Add:
<move element="test-link" destination="header.links"/>
Here "test-link" is the name of your test link block which created in step 1.
Step 3: Refresh Cache and you have done it.
Magento2: How to add custom link at top header links after LogIn Or Register link in Magento2
Reviewed by Web Technology Funda
on
5:23:00 AM
Rating:
No comments