In this tutorial, we are going to discuss that how can we create a custom link for ‘my account’ section in Magento 2 for customer’s dashboard.
The first thing we need to do is to create a layout XML file in our theme. Let’s call it customer_account.xml
Path & file: app/design/frontend/Magemonkeys/magetheme/Magento_Customer/layout/customer_account.xml
Add below code in your layout XML file.
1 2 3 4 5 6 7 8 |
<referenceBlock name="customer_account_navigation"> <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-custom-link" after="-" > <arguments> <argument name="label" xsi:type="string" translate="true">Custom Label</argument> <argument name="path" xsi:type="string">custom-link-path</argument> </arguments> </block> </referenceBlock> |
That’s it. Hope you will able to create a custom link by using the above method.
[crayon-63e0a5ca87a40948656131/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.